ObjectRelationshipCollection.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // System.Data.ObjectSpaces.Schema.ObjectRelationshipCollection.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System.Collections;
  11. namespace System.Data.ObjectSpaces.Schema {
  12. public class ObjectRelationshipCollection : CollectionBase
  13. {
  14. #region Properties
  15. [MonoTODO]
  16. public ObjectRelationship this [string name] {
  17. get { throw new NotImplementedException (); }
  18. }
  19. [MonoTODO]
  20. public ObjectRelationship this [int index] {
  21. get { return (ObjectRelationship) List [index]; }
  22. }
  23. #endregion // Properties
  24. #region Methods
  25. public void Add (ObjectRelationship relationship)
  26. {
  27. Insert (Count, relationship);
  28. }
  29. public bool Contains (ObjectRelationship relationship)
  30. {
  31. return List.Contains (relationship);
  32. }
  33. [MonoTODO]
  34. public ObjectRelationship[] GetChildRelationships (Type type)
  35. {
  36. throw new NotImplementedException ();
  37. }
  38. [MonoTODO]
  39. public ObjectRelationship[] GetParentRelationships (Type type)
  40. {
  41. throw new NotImplementedException ();
  42. }
  43. public int IndexOf (ObjectRelationship relationship)
  44. {
  45. return List.IndexOf (relationship);
  46. }
  47. public void Insert (int index, ObjectRelationship relationship)
  48. {
  49. List.Insert (index, relationship);
  50. }
  51. [MonoTODO]
  52. protected override void OnInsert (int index, object value)
  53. {
  54. throw new NotImplementedException ();
  55. }
  56. [MonoTODO]
  57. protected override void OnRemove (int index, object value)
  58. {
  59. throw new NotImplementedException ();
  60. }
  61. public void Remove (ObjectRelationship relation)
  62. {
  63. List.Remove (relation);
  64. }
  65. #endregion // Methods
  66. }
  67. }
  68. #endif // NET_1_2