EventLogPermissionEntryCollection.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //
  2. // System.Diagnostics.EventLogPermissionEntryCollection.cs
  3. //
  4. // Authors:
  5. // Jonathan Pryor ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2002 Jonathan Pryor
  9. // (C) 2003 Andreas Nahr
  10. //
  11. using System;
  12. using System.Collections;
  13. using System.Diagnostics;
  14. using System.Security.Permissions;
  15. namespace System.Diagnostics
  16. {
  17. [Serializable]
  18. public class EventLogPermissionEntryCollection : CollectionBase
  19. {
  20. private EventLogPermissionEntryCollection()
  21. {
  22. }
  23. internal EventLogPermissionEntryCollection (ResourcePermissionBaseEntry[] entries)
  24. {
  25. foreach (ResourcePermissionBaseEntry entry in entries) {
  26. List.Add (new EventLogPermissionEntry ((EventLogPermissionAccess) entry.PermissionAccess, entry.PermissionAccessPath[0]));
  27. }
  28. }
  29. public EventLogPermissionEntry this [int index] {
  30. get { return ((EventLogPermissionEntry) List[index]); }
  31. set { List[index] = value; }
  32. }
  33. public int Add(EventLogPermissionEntry value)
  34. {
  35. return List.Add (value);
  36. }
  37. public void AddRange(EventLogPermissionEntry[] value)
  38. {
  39. foreach (EventLogPermissionEntry entry in value)
  40. List.Add (entry);
  41. }
  42. public void AddRange(EventLogPermissionEntryCollection value)
  43. {
  44. foreach (EventLogPermissionEntry entry in value)
  45. List.Add (entry);
  46. }
  47. public bool Contains(EventLogPermissionEntry value)
  48. {
  49. return List.Contains (value);
  50. }
  51. public void CopyTo(EventLogPermissionEntry[] array, int index)
  52. {
  53. List.CopyTo (array, index);
  54. }
  55. public int IndexOf(EventLogPermissionEntry value)
  56. {
  57. return List.IndexOf (value);
  58. }
  59. public void Insert(int index, EventLogPermissionEntry value)
  60. {
  61. List.Insert (index, value);
  62. }
  63. [MonoTODO]
  64. protected override void OnClear()
  65. {
  66. throw new NotImplementedException();
  67. }
  68. [MonoTODO]
  69. protected override void OnInsert(int index, object value)
  70. {
  71. throw new NotImplementedException();
  72. }
  73. [MonoTODO]
  74. protected override void OnRemove(int index, object value)
  75. {
  76. throw new NotImplementedException();
  77. }
  78. [MonoTODO]
  79. protected override void OnSet(int index, object oldValue,
  80. object newValue)
  81. {
  82. throw new NotImplementedException();
  83. }
  84. public void Remove(EventLogPermissionEntry value)
  85. {
  86. List.Remove (value);
  87. }
  88. }
  89. }