// Constructor. public PerformanceCounterPermissionResourceEntry (PerformanceCounterPermissionEntry entry, int access, String[] path) : base(access, path) { this.entry = entry; }
/// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public PerformanceCounterPermission(PerformanceCounterPermissionEntry[] permissionAccessEntries) { if (permissionAccessEntries == null) throw new ArgumentNullException("permissionAccessEntries"); SetNames(); for (int index = 0; index < permissionAccessEntries.Length; ++index) this.AddPermissionAccess(permissionAccessEntries[index]); }
public void AddRange(PerformanceCounterPermissionEntry[] value) { if (value == null) { throw new ArgumentNullException("value"); } for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) { this.Add(value[i]); } }
public PerformanceCounterPermission (PerformanceCounterPermissionEntry[] permissionAccessEntries) { if (permissionAccessEntries == null) throw new ArgumentNullException("permissionAccessEntries"); SetUp (); innerCollection = new PerformanceCounterPermissionEntryCollection (this); innerCollection.AddRange (permissionAccessEntries); }
public PerformanceCounterPermission (PerformanceCounterPermissionEntry[] permissionAccessEntries) : this(PermissionState.None) { foreach(PerformanceCounterPermissionEntry entry in permissionAccessEntries) { AddPermissionAccess(entry.ToResourceEntry()); } }
// Add a range of elements to this collection. public void AddRange(PerformanceCounterPermissionEntry[] value) { if(value == null) { throw new ArgumentNullException("value"); } foreach(PerformanceCounterPermissionEntry val in value) { Add(val); } }
public PerformanceCounterPermission(PerformanceCounterPermissionEntry[] permissionAccessEntries) { if (permissionAccessEntries == null) { throw new ArgumentNullException("permissionAccessEntries"); } this.SetNames(); for (int i = 0; i < permissionAccessEntries.Length; i++) { this.AddPermissionAccess(permissionAccessEntries[i]); } }
internal PerformanceCounterPermissionEntryCollection (PerformanceCounterPermission owner) { this.owner = owner; ResourcePermissionBaseEntry[] entries = owner.GetEntries (); if (entries.Length > 0) { foreach (ResourcePermissionBaseEntry entry in entries) { PerformanceCounterPermissionAccess elpa = (PerformanceCounterPermissionAccess) entry.PermissionAccess; string machine = entry.PermissionAccessPath [0]; string category = entry.PermissionAccessPath [1]; PerformanceCounterPermissionEntry elpe = new PerformanceCounterPermissionEntry (elpa, machine, category); // we don't want to add them (again) to the base class InnerList.Add (elpe); } } }
internal PerformanceCounterPermissionEntryCollection(PerformanceCounterPermission owner) { this.owner = owner; ResourcePermissionBaseEntry[] entries = owner.GetEntries(); if (entries.Length > 0) { foreach (ResourcePermissionBaseEntry entry in entries) { PerformanceCounterPermissionAccess elpa = (PerformanceCounterPermissionAccess)entry.PermissionAccess; string machine = entry.PermissionAccessPath [0]; string category = entry.PermissionAccessPath [1]; PerformanceCounterPermissionEntry elpe = new PerformanceCounterPermissionEntry(elpa, machine, category); // we don't want to add them (again) to the base class InnerList.Add(elpe); } } }
public bool Contains(PerformanceCounterPermissionEntry value) { throw new NotImplementedException(); }
public bool Contains(PerformanceCounterPermissionEntry value) { return(base.List.Contains(value)); }
public void Insert(int index, PerformanceCounterPermissionEntry value) { base.List.Insert(index, value); }
public bool Contains (PerformanceCounterPermissionEntry value) { return default(bool); }
public int Add (PerformanceCounterPermissionEntry value) { return default(int); }
public bool Contains(PerformanceCounterPermissionEntry value) { return(false); }
// Get the index of a specific element in this collection. public int IndexOf(PerformanceCounterPermissionEntry value) { return ((IList)this).IndexOf(value); }
public PerformanceCounterPermission(PerformanceCounterPermissionEntry[] permissionAccessEntries) { }
public void PermissionEntries () { PerformanceCounterPermissionAccess pcpa = PerformanceCounterPermissionAccess.None; PerformanceCounterPermission pcp = new PerformanceCounterPermission (pcpa, "localhost", String.Empty); PerformanceCounterPermissionEntryCollection pcpec = pcp.PermissionEntries; Assert.AreEqual (1, pcpec.Count, "Count==1"); PerformanceCounterPermissionEntry pcpe = new PerformanceCounterPermissionEntry (PerformanceCounterPermissionAccess.Browse, "*", String.Empty); pcp.PermissionEntries.Add (pcpe); Assert.AreEqual (2, pcpec.Count, "Count==2"); // remove (same instance) pcp.PermissionEntries.Remove (pcpe); Assert.AreEqual (1, pcpec.Count, "Count==1 (b)"); // remove different instance (doesn't work) pcpe = new PerformanceCounterPermissionEntry (PerformanceCounterPermissionAccess.None, "localhost", String.Empty); Assert.AreEqual (1, pcpec.Count, "Count==1"); }
// Determine if an item exists in this collection. public bool Contains(PerformanceCounterPermissionEntry value) { return(((IList)this).Contains(value)); }
public void AddRange (PerformanceCounterPermissionEntry[] value) { foreach (PerformanceCounterPermissionEntry e in value) List.Add (e); }
internal void Remove(object obj) { PerformanceCounterPermissionEntry pcpe = (obj as PerformanceCounterPermissionEntry); base.RemovePermissionAccess(pcpe.CreateResourcePermissionBaseEntry()); }
internal void Remove(PerformanceCounterPermissionEntry entry) { RemovePermissionAccess(entry.ToResourceEntry()); }
public void Insert(int index, PerformanceCounterPermissionEntry value) { throw new NotImplementedException(); }
public void Copy () { foreach (PerformanceCounterPermissionAccess pcpa in AllAccess) { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PermissionState.None); PerformanceCounterPermissionEntry pcpe = new PerformanceCounterPermissionEntry (pcpa, pcpa.ToString (), String.Empty); pcp.PermissionEntries.Add (pcpe); PerformanceCounterPermission copy = (PerformanceCounterPermission)pcp.Copy (); Assert.AreEqual (1, copy.PermissionEntries.Count, "Count==1"); Assert.AreEqual (pcpa, pcp.PermissionEntries [0].PermissionAccess, pcpa.ToString ()); } }
public PerformanceCounterPermission (PerformanceCounterPermissionEntry[]! permissionAccessEntries) { Contract.Requires(permissionAccessEntries != null); return default(PerformanceCounterPermission); }
internal void AddDirect(PerformanceCounterPermissionEntry value) { InnerList.Add(value); }
public void Insert(int index, PerformanceCounterPermissionEntry value) { }
public int Add(PerformanceCounterPermissionEntry value) { return List.Add(value); }
public int IndexOf(PerformanceCounterPermissionEntry value) { return(default(int)); }
// Add an element to this collection. public int Add(PerformanceCounterPermissionEntry value) { return(((IList)this).Add(value)); }
public void AddRange (PerformanceCounterPermissionEntry[]! value) { Contract.Requires(value != null); }
public int IndexOf(PerformanceCounterPermissionEntry value) { return List.IndexOf(value); }
public int Add(PerformanceCounterPermissionEntry value) { return(base.List.Add(value)); }
// Remove an element from this collection. public void Remove(PerformanceCounterPermissionEntry value) { ((IList)this).Remove(value); }
public int IndexOf(PerformanceCounterPermissionEntry value) { return(base.List.IndexOf(value)); }
internal void RemovePermissionAccess(PerformanceCounterPermissionEntry entry) { base.RemovePermissionAccess(entry.GetBaseEntry()); }
public void Remove(PerformanceCounterPermissionEntry value) { base.List.Remove(value); }
public int IndexOf(PerformanceCounterPermissionEntry value) { throw new NotImplementedException(); }
public void Remove(PerformanceCounterPermissionEntry value) { throw new NotImplementedException(); }
// Determine if an item exists in this collection. public bool Contains(PerformanceCounterPermissionEntry value) { return ((IList)this).Contains(value); }
///<internalonly/> internal void RemovePermissionAccess(PerformanceCounterPermissionEntry entry) { base.RemovePermissionAccess(entry.GetBaseEntry()); }
// Insert an element into this collection. public void Insert(int index, PerformanceCounterPermissionEntry value) { ((IList)this).Insert(index, value); }
public int IndexOf(PerformanceCounterPermissionEntry value) { return(0); }
public void Insert (int index, PerformanceCounterPermissionEntry value) { }
public void Remove(PerformanceCounterPermissionEntry value) { }
public void CopyTo (PerformanceCounterPermissionEntry[] array, int index) { }
public bool Contains(PerformanceCounterPermissionEntry value) { return(default(bool)); }
// Add an element to this collection. public int Add(PerformanceCounterPermissionEntry value) { return ((IList)this).Add(value); }
internal void Add(PerformanceCounterPermissionEntry entry) { AddPermissionAccess(entry.ToResourceEntry()); }
public void Remove (PerformanceCounterPermissionEntry value) { }
// Copy the elements in this collection to an array. public void CopyTo(PerformanceCounterPermissionEntry[] array, int index) { ((IList)this).CopyTo(array, index); }
// Get the index of a specific element in this collection. public int IndexOf(PerformanceCounterPermissionEntry value) { return(((IList)this).IndexOf(value)); }