DataTableRelationCollection.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. //
  2. // System.Data.DataTableRelationCollection.cs
  3. //
  4. // Author:
  5. // Christopher Podurgiel ([email protected])
  6. //
  7. // (C) Chris Podurgiel
  8. //
  9. using System;
  10. using System.Collections;
  11. using System.ComponentModel;
  12. using System.Data.Common;
  13. namespace System.Data
  14. {
  15. /// <summary>
  16. /// Summary description for DataTableRelationCollection.
  17. /// </summary>
  18. internal class DataTableRelationCollection : DataRelationCollection
  19. {
  20. /// <summary>
  21. /// Initializes a new instance of the DataRelationCollection class.
  22. /// </summary>
  23. [MonoTODO]
  24. internal DataTableRelationCollection():base()
  25. {
  26. // TODO: need to the constructor
  27. }
  28. /// <summary>
  29. /// Gets the DataRelation object specified by name.
  30. /// </summary>
  31. [MonoTODO]
  32. public override DataRelation this[string name]
  33. {
  34. get
  35. {
  36. foreach (DataRelation dataRelation in list)
  37. {
  38. if (dataRelation.RelationName == name)
  39. {
  40. return dataRelation;
  41. }
  42. }
  43. return null;
  44. }
  45. }
  46. /// <summary>
  47. /// Gets the DataRelation object at the specified index.
  48. /// </summary>
  49. [MonoTODO]
  50. public override DataRelation this[int index]
  51. {
  52. get
  53. {
  54. return (DataRelation)list[index];
  55. }
  56. }
  57. /// <summary>
  58. /// Copies the elements of the specified DataRelation array to the end of the collection.
  59. /// </summary>
  60. /// <param name="relations">The array of DataRelation objects to add to the collection.</param>
  61. [MonoTODO]
  62. public override void AddRange(DataRelation[] relations)
  63. {
  64. throw new NotImplementedException ();
  65. }
  66. [MonoTODO]
  67. public override bool CanRemove(DataRelation relation)
  68. {
  69. throw new NotImplementedException ();
  70. }
  71. [MonoTODO]
  72. public override void Clear()
  73. {
  74. throw new NotImplementedException ();
  75. }
  76. [MonoTODO]
  77. public override bool Contains(string name)
  78. {
  79. throw new NotImplementedException ();
  80. }
  81. [MonoTODO]
  82. protected override DataSet GetDataSet()
  83. {
  84. throw new NotImplementedException ();
  85. }
  86. [MonoTODO]
  87. public override int IndexOf(DataRelation relation)
  88. {
  89. return list.IndexOf(relation);
  90. }
  91. [MonoTODO]
  92. public override int IndexOf(string relationName)
  93. {
  94. return list.IndexOf(this[relationName]);
  95. }
  96. [MonoTODO]
  97. protected override void OnCollectionChanged(CollectionChangeEventArgs ccevent)
  98. {
  99. throw new NotImplementedException ();
  100. }
  101. [MonoTODO]
  102. protected internal override void OnCollectionChanging(CollectionChangeEventArgs ccevent)
  103. {
  104. throw new NotImplementedException ();
  105. }
  106. }
  107. }