2 // System.ServiceProcess.ServiceControllerPermissionEntry.cs
5 // Duncan Mak (duncan@ximian.com)
7 // (C) 2003, Ximian Inc.
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 using System.Collections;
34 namespace System.ServiceProcess {
37 public class ServiceControllerPermissionEntryCollection : CollectionBase
40 public ServiceControllerPermissionEntry this [int index] {
42 get { return base.List [index] as ServiceControllerPermissionEntry; }
44 set { base.List [index] = value; }
48 public int Add (ServiceControllerPermissionEntry value)
50 return base.List.Add (value);
53 public void AddRange (ServiceControllerPermissionEntry [] value)
55 foreach (ServiceControllerPermissionEntry entry in value)
56 base.List.Add (entry);
59 public void AddRange (ServiceControllerPermissionEntryCollection value)
61 foreach (ServiceControllerPermissionEntry entry in value)
62 base.List.Add (entry);
65 public bool Contains (ServiceControllerPermissionEntry value)
67 return base.List.Contains (value);
70 public void CopyTo (ServiceControllerPermissionEntry [] array, int index)
72 base.List.CopyTo (array, index);
75 public int IndexOf (ServiceControllerPermissionEntry value)
77 return base.List.IndexOf (value);
80 public void Insert (int index, ServiceControllerPermissionEntry value)
82 base.List.Insert (index, value);
85 public void Remove (ServiceControllerPermissionEntry value)
87 base.List.Remove (value);
90 protected override void OnClear () {}
92 protected override void OnInsert (int index, object value) {}
94 protected override void OnRemove (int index, object value) {}
96 protected override void OnSet (int index, object oldValue, object newValue) {}