1 //------------------------------------------------------------------------------ 2 // <copyright file="LinqDataSourceInsertEventArgs.cs" company="Microsoft"> 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // </copyright> 5 //------------------------------------------------------------------------------ 6 7 namespace System.Web.UI.WebControls { 8 using System; 9 using System.ComponentModel; 10 using System.Diagnostics.CodeAnalysis; 11 12 public class LinqDataSourceInsertEventArgs : CancelEventArgs { 13 14 private LinqDataSourceValidationException _exception; 15 private bool _exceptionHandled; 16 private object _newObject; 17 18 [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object", 19 Justification = "Names are consistent with those used in the ObjectDataSource classes")] LinqDataSourceInsertEventArgs(object newObject)20 public LinqDataSourceInsertEventArgs(object newObject) { 21 _newObject = newObject; 22 } 23 LinqDataSourceInsertEventArgs(LinqDataSourceValidationException exception)24 public LinqDataSourceInsertEventArgs(LinqDataSourceValidationException exception) { 25 _exception = exception; 26 } 27 28 public LinqDataSourceValidationException Exception { 29 get { 30 return _exception; 31 } 32 } 33 34 public bool ExceptionHandled { 35 get { 36 return _exceptionHandled; 37 } 38 set { 39 _exceptionHandled = value; 40 } 41 } 42 43 public object NewObject { 44 get { 45 return _newObject; 46 } 47 } 48 49 } 50 } 51 52