1 //------------------------------------------------------------------------------
3 // This code was generated by a tool.
4 // Runtime Version:2.0.50727.1318
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
9 //------------------------------------------------------------------------------
11 #pragma warning disable 1591
13 namespace MonoTests.System.Data {
17 ///Represents a strongly typed in-memory cache of data.
19 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
20 [global::System.Serializable()]
21 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
22 [global::System.ComponentModel.ToolboxItem(true)]
23 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
24 [global::System.Xml.Serialization.XmlRootAttribute("DataSet1")]
25 // [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
26 public partial class DataSet1 : global::System.Data.DataSet {
28 private DataTable1DataTable tableDataTable1;
30 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
32 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
36 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37 base.Tables.CollectionChanged += schemaChangedHandler;
38 base.Relations.CollectionChanged += schemaChangedHandler;
42 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43 protected DataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
44 base(info, context, false) {
45 if ((this.IsBinarySerialized(info, context) == true)) {
47 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
48 this.Tables.CollectionChanged += schemaChangedHandler1;
49 this.Relations.CollectionChanged += schemaChangedHandler1;
52 string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
53 if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
54 global::System.Data.DataSet ds = new global::System.Data.DataSet();
55 ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
56 if ((ds.Tables["DataTable1"] != null)) {
57 base.Tables.Add(new DataTable1DataTable(ds.Tables["DataTable1"]));
59 this.DataSetName = ds.DataSetName;
60 this.Prefix = ds.Prefix;
61 this.Namespace = ds.Namespace;
62 this.Locale = ds.Locale;
63 this.CaseSensitive = ds.CaseSensitive;
64 this.EnforceConstraints = ds.EnforceConstraints;
65 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
69 this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
71 this.GetSerializationData(info, context);
72 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
73 base.Tables.CollectionChanged += schemaChangedHandler;
74 this.Relations.CollectionChanged += schemaChangedHandler;
77 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
78 [global::System.ComponentModel.Browsable(false)]
79 [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
80 public DataTable1DataTable DataTable1 {
82 return this.tableDataTable1;
86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
87 [global::System.ComponentModel.BrowsableAttribute(true)]
88 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
89 public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
91 return this._schemaSerializationMode;
94 this._schemaSerializationMode = value;
98 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
99 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
100 public new global::System.Data.DataTableCollection Tables {
106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
107 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
108 public new global::System.Data.DataRelationCollection Relations {
110 return base.Relations;
114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
115 protected override void InitializeDerivedDataSet() {
121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
122 public override global::System.Data.DataSet Clone() {
123 DataSet1 cln = ((DataSet1)(base.Clone()));
125 cln.SchemaSerializationMode = this.SchemaSerializationMode;
129 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
130 protected override bool ShouldSerializeTables() {
134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
135 protected override bool ShouldSerializeRelations() {
139 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
140 protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
141 if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
143 global::System.Data.DataSet ds = new global::System.Data.DataSet();
145 if ((ds.Tables["DataTable1"] != null)) {
146 base.Tables.Add(new DataTable1DataTable(ds.Tables["DataTable1"]));
148 this.DataSetName = ds.DataSetName;
149 this.Prefix = ds.Prefix;
150 this.Namespace = ds.Namespace;
151 this.Locale = ds.Locale;
152 this.CaseSensitive = ds.CaseSensitive;
153 this.EnforceConstraints = ds.EnforceConstraints;
154 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
158 this.ReadXml(reader);
163 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
164 protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
165 global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
166 this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
168 return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
171 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
172 internal void InitVars() {
176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
177 internal void InitVars(bool initTable) {
178 this.tableDataTable1 = ((DataTable1DataTable)(base.Tables["DataTable1"]));
179 if ((initTable == true)) {
180 if ((this.tableDataTable1 != null)) {
181 this.tableDataTable1.InitVars();
186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
187 private void InitClass() {
188 this.DataSetName = "DataSet1";
190 this.Namespace = "http://tempuri.org/DataSet1.xsd";
191 this.EnforceConstraints = true;
192 this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
193 this.tableDataTable1 = new DataTable1DataTable();
194 base.Tables.Add(this.tableDataTable1);
197 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
198 private bool ShouldSerializeDataTable1() {
202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
203 private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
204 if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
210 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
211 DataSet1 ds = new DataSet1();
212 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
213 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
214 xs.Add(ds.GetSchemaSerializable());
215 global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
216 any.Namespace = ds.Namespace;
217 sequence.Items.Add(any);
218 type.Particle = sequence;
222 public delegate void DataTable1RowChangeEventHandler(object sender, DataTable1RowChangeEvent e);
225 ///Represents the strongly named DataTable class.
227 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
228 [global::System.Serializable()]
229 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
230 public partial class DataTable1DataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
232 private global::System.Data.DataColumn columnColumn1;
234 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
235 public DataTable1DataTable() {
236 this.TableName = "DataTable1";
242 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
243 internal DataTable1DataTable(global::System.Data.DataTable table) {
244 this.TableName = table.TableName;
245 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
246 this.CaseSensitive = table.CaseSensitive;
248 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
249 this.Locale = table.Locale;
251 if ((table.Namespace != table.DataSet.Namespace)) {
252 this.Namespace = table.Namespace;
254 this.Prefix = table.Prefix;
255 this.MinimumCapacity = table.MinimumCapacity;
258 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
259 protected DataTable1DataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
260 base(info, context) {
264 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
265 public global::System.Data.DataColumn Column1Column {
267 return this.columnColumn1;
271 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
272 [global::System.ComponentModel.Browsable(false)]
275 return this.Rows.Count;
279 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
280 public DataTable1Row this[int index] {
282 return ((DataTable1Row)(this.Rows[index]));
286 public event DataTable1RowChangeEventHandler DataTable1RowChanging;
288 public event DataTable1RowChangeEventHandler DataTable1RowChanged;
290 public event DataTable1RowChangeEventHandler DataTable1RowDeleting;
292 public event DataTable1RowChangeEventHandler DataTable1RowDeleted;
294 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
295 public void AddDataTable1Row(DataTable1Row row) {
299 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
300 public DataTable1Row AddDataTable1Row(string Column1) {
301 DataTable1Row rowDataTable1Row = ((DataTable1Row)(this.NewRow()));
302 object[] columnValuesArray = new object[] {
304 rowDataTable1Row.ItemArray = columnValuesArray;
305 this.Rows.Add(rowDataTable1Row);
306 return rowDataTable1Row;
309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
310 public virtual global::System.Collections.IEnumerator GetEnumerator() {
311 return this.Rows.GetEnumerator();
314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
315 public override global::System.Data.DataTable Clone() {
316 DataTable1DataTable cln = ((DataTable1DataTable)(base.Clone()));
321 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
322 protected override global::System.Data.DataTable CreateInstance() {
323 return new DataTable1DataTable();
326 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
327 internal void InitVars() {
328 this.columnColumn1 = base.Columns["Column1"];
331 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
332 private void InitClass() {
333 this.columnColumn1 = new global::System.Data.DataColumn("Column1", typeof(string), null, global::System.Data.MappingType.Element);
334 base.Columns.Add(this.columnColumn1);
337 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
338 public DataTable1Row NewDataTable1Row() {
339 return ((DataTable1Row)(this.NewRow()));
342 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
343 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
344 return new DataTable1Row(builder);
347 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
348 protected override global::System.Type GetRowType() {
349 return typeof(DataTable1Row);
352 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
353 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
354 base.OnRowChanged(e);
355 if ((this.DataTable1RowChanged != null)) {
356 this.DataTable1RowChanged(this, new DataTable1RowChangeEvent(((DataTable1Row)(e.Row)), e.Action));
360 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
361 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
362 base.OnRowChanging(e);
363 if ((this.DataTable1RowChanging != null)) {
364 this.DataTable1RowChanging(this, new DataTable1RowChangeEvent(((DataTable1Row)(e.Row)), e.Action));
368 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
369 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
370 base.OnRowDeleted(e);
371 if ((this.DataTable1RowDeleted != null)) {
372 this.DataTable1RowDeleted(this, new DataTable1RowChangeEvent(((DataTable1Row)(e.Row)), e.Action));
376 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
377 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
378 base.OnRowDeleting(e);
379 if ((this.DataTable1RowDeleting != null)) {
380 this.DataTable1RowDeleting(this, new DataTable1RowChangeEvent(((DataTable1Row)(e.Row)), e.Action));
384 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
385 public void RemoveDataTable1Row(DataTable1Row row) {
386 this.Rows.Remove(row);
389 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
390 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
391 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
392 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
393 DataSet1 ds = new DataSet1();
394 xs.Add(ds.GetSchemaSerializable());
395 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
396 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
397 any1.MinOccurs = new decimal(0);
398 any1.MaxOccurs = decimal.MaxValue;
399 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
400 sequence.Items.Add(any1);
401 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
402 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
403 any2.MinOccurs = new decimal(1);
404 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
405 sequence.Items.Add(any2);
406 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
407 attribute1.Name = "namespace";
408 attribute1.FixedValue = ds.Namespace;
409 type.Attributes.Add(attribute1);
410 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
411 attribute2.Name = "tableTypeName";
412 attribute2.FixedValue = "DataTable1DataTable";
413 type.Attributes.Add(attribute2);
414 type.Particle = sequence;
420 ///Represents strongly named DataRow class.
422 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
423 public partial class DataTable1Row : global::System.Data.DataRow {
425 private DataTable1DataTable tableDataTable1;
427 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
428 internal DataTable1Row(global::System.Data.DataRowBuilder rb) :
430 this.tableDataTable1 = ((DataTable1DataTable)(this.Table));
433 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
434 public string Column1 {
437 return ((string)(this[this.tableDataTable1.Column1Column]));
439 catch (global::System.InvalidCastException e) {
440 throw new global::System.Data.StrongTypingException("The value for column \'Column1\' in table \'DataTable1\' is DBNull.", e);
444 this[this.tableDataTable1.Column1Column] = value;
448 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
449 public bool IsColumn1Null() {
450 return this.IsNull(this.tableDataTable1.Column1Column);
453 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
454 public void SetColumn1Null() {
455 this[this.tableDataTable1.Column1Column] = global::System.Convert.DBNull;
460 ///Row event argument class
462 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
463 public class DataTable1RowChangeEvent : global::System.EventArgs {
465 private DataTable1Row eventRow;
467 private global::System.Data.DataRowAction eventAction;
469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
470 public DataTable1RowChangeEvent(DataTable1Row row, global::System.Data.DataRowAction action) {
472 this.eventAction = action;
475 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
476 public DataTable1Row Row {
478 return this.eventRow;
482 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
483 public global::System.Data.DataRowAction Action {
485 return this.eventAction;
492 #pragma warning restore 1591