Update Reference Sources to .NET Framework 4.6
[mono.git] / mcs / class / referencesource / System.Data / System / Data / FillErrorEventArgs.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="FillErrorEventArgs.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">Microsoft</owner>
6 // <owner current="true" primary="false">Microsoft</owner>
7 //------------------------------------------------------------------------------
8
9 namespace System.Data { // MDAC 59437
10
11     using System;
12     using System.Data;
13
14     public class FillErrorEventArgs : System.EventArgs {
15         private bool continueFlag;
16         private DataTable dataTable;
17         private Exception errors;
18         private object[] values;
19
20         public FillErrorEventArgs(DataTable dataTable, object[] values) {
21             this.dataTable = dataTable;
22             this.values = values;
23             if (null == this.values) {
24                 this.values = new object[0];
25             }
26         }
27
28         public bool Continue {
29             get {
30                 return this.continueFlag;
31             }
32             set {
33                 this.continueFlag = value;
34             }
35         }
36
37         public DataTable DataTable {
38             get {
39                 return this.dataTable;
40             }
41         }
42
43         public Exception Errors {
44             get {
45                 return this.errors;
46             }
47             set {
48                 this.errors = value;
49             }
50         }
51
52         public object[] Values {
53             get {
54                 object[] copy = new object[values.Length];
55                 for(int i = 0; i < values.Length; ++i) {
56                     copy[i] = values[i]; // WebData 107464
57                 }
58                 return copy;
59             }
60         }
61     }
62 }