2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.Diagnostics / EventLogPermissionEntryCollection.cs
1 //
2 // System.Diagnostics.EventLogPermissionEntryCollection.cs
3 //
4 // Authors:
5 //   Jonathan Pryor (jonpryor@vt.edu)
6 //   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
7 //
8 // (C) 2002 Jonathan Pryor
9 // (C) 2003 Andreas Nahr
10 //
11
12
13 using System;
14 using System.Collections;
15 using System.Diagnostics;
16 using System.Security.Permissions;
17
18 namespace System.Diagnostics 
19 {
20
21         [Serializable]
22         public class EventLogPermissionEntryCollection : CollectionBase 
23         {
24
25                 private EventLogPermissionEntryCollection()
26                 {
27                 }
28
29                 internal EventLogPermissionEntryCollection (ResourcePermissionBaseEntry[] entries)
30                 {
31                         foreach (ResourcePermissionBaseEntry entry in entries) {
32                                 List.Add (new EventLogPermissionEntry ((EventLogPermissionAccess) entry.PermissionAccess, entry.PermissionAccessPath[0]));
33                         }       
34                 }
35
36                 public EventLogPermissionEntry this [int index] {
37                         get { return ((EventLogPermissionEntry) List[index]); }
38                         set { List[index] = value; }
39                 }
40
41                 public int Add(EventLogPermissionEntry value)
42                 {
43                         return List.Add (value);
44                 }
45
46                 public void AddRange(EventLogPermissionEntry[] value)
47                 {
48                         foreach (EventLogPermissionEntry entry in value)
49                                 List.Add (entry);
50                 }
51
52                 public void AddRange(EventLogPermissionEntryCollection value)
53                 {
54                         foreach (EventLogPermissionEntry entry in value)
55                                 List.Add (entry);
56                 }
57
58                 public bool Contains(EventLogPermissionEntry value)
59                 {
60                         return List.Contains (value);
61                 }
62
63                 public void CopyTo(EventLogPermissionEntry[] array, int index)
64                 {
65                         List.CopyTo (array, index);
66                 }
67
68                 public int IndexOf(EventLogPermissionEntry value)
69                 {
70                         return List.IndexOf (value);
71                 }
72
73                 public void Insert(int index, EventLogPermissionEntry value)
74                 {
75                         List.Insert (index, value);
76                 }
77
78                 [MonoTODO]
79                 protected override void OnClear()
80                 {
81                         throw new NotImplementedException();
82                 }
83
84                 [MonoTODO]
85                 protected override void OnInsert(int index, object value)
86                 {
87                         throw new NotImplementedException();
88                 }
89
90                 [MonoTODO]
91                 protected override void OnRemove(int index, object value)
92                 {
93                         throw new NotImplementedException();
94                 }
95
96                 [MonoTODO]
97                 protected override void OnSet(int index, object oldValue, 
98                         object newValue)
99                 {
100                         throw new NotImplementedException();
101                 }
102
103                 public void Remove(EventLogPermissionEntry value)
104                 {
105                         List.Remove (value);
106                 }
107         }
108 }
109