EventLogPermissionEntryCollection.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 virtual EventLogEntry this [int index] {
  30. get {return (EventLogEntry) List[index];}
  31. }
  32. public int Add(EventLogPermissionEntry value)
  33. {
  34. return List.Add (value);
  35. }
  36. public void AddRange(EventLogPermissionEntry[] value)
  37. {
  38. foreach (EventLogPermissionEntry entry in value)
  39. List.Add (entry);
  40. }
  41. public void AddRange(EventLogPermissionEntryCollection value)
  42. {
  43. foreach (EventLogPermissionEntry entry in value)
  44. List.Add (entry);
  45. }
  46. public bool Contains(EventLogPermissionEntry value)
  47. {
  48. return List.Contains (value);
  49. }
  50. public void CopyTo(EventLogPermissionEntry[] array, int index)
  51. {
  52. List.CopyTo (array, index);
  53. }
  54. public int IndexOf(EventLogPermissionEntry value)
  55. {
  56. return List.IndexOf (value);
  57. }
  58. public void Insert(int index, EventLogPermissionEntry value)
  59. {
  60. List.Insert (index, value);
  61. }
  62. [MonoTODO]
  63. protected override void OnClear()
  64. {
  65. throw new NotImplementedException();
  66. }
  67. [MonoTODO]
  68. protected override void OnInsert(int index, object value)
  69. {
  70. throw new NotImplementedException();
  71. }
  72. [MonoTODO]
  73. protected override void OnRemove(int index, object value)
  74. {
  75. throw new NotImplementedException();
  76. }
  77. [MonoTODO]
  78. protected override void OnSet(int index, object oldValue,
  79. object newValue)
  80. {
  81. throw new NotImplementedException();
  82. }
  83. public void Remove(EventLogPermissionEntry value)
  84. {
  85. List.Remove (value);
  86. }
  87. }
  88. }