コード例 #1
0
 // Constructor.
 public PerformanceCounterPermissionResourceEntry
     (PerformanceCounterPermissionEntry entry,
     int access, String[] path)
     : base(access, path)
 {
     this.entry = entry;
 }
コード例 #2
0
 /// <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]);                          
 }
コード例 #3
0
 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]);
     }
 }
コード例 #4
0
		public PerformanceCounterPermission (PerformanceCounterPermissionEntry[] permissionAccessEntries)
		{
			if (permissionAccessEntries == null)
				throw new ArgumentNullException("permissionAccessEntries");

			SetUp ();
			innerCollection = new PerformanceCounterPermissionEntryCollection (this);
			innerCollection.AddRange (permissionAccessEntries);
		}
コード例 #5
0
	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);
				}
			}
		}
コード例 #9
0
 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);
         }
     }
 }
コード例 #10
0
 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)
 {
 }
コード例 #18
0
		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");
		}
コード例 #19
0
 // 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);
		}
		// Constructor.
		public PerformanceCounterPermissionResourceEntry
					(PerformanceCounterPermissionEntry entry,
					 int access, String[] path)
				: base(access, path)
				{
					this.entry = entry;
				}
コード例 #22
0
        internal void Remove(object obj)
        {
            PerformanceCounterPermissionEntry pcpe = (obj as PerformanceCounterPermissionEntry);

            base.RemovePermissionAccess(pcpe.CreateResourcePermissionBaseEntry());
        }
コード例 #23
0
	internal void Remove(PerformanceCounterPermissionEntry entry)
			{
				RemovePermissionAccess(entry.ToResourceEntry());
			}
コード例 #24
0
 public void Insert(int index, PerformanceCounterPermissionEntry value)
 {
     throw new NotImplementedException();
 }
コード例 #25
0
		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);
        }
コード例 #27
0
 internal void AddDirect(PerformanceCounterPermissionEntry value)
 {
     InnerList.Add(value);
 }
 public void Insert(int index, PerformanceCounterPermissionEntry value)
 {
 }
コード例 #29
0
 public int Add(PerformanceCounterPermissionEntry value) {   
     return List.Add(value);
 }
 public int IndexOf(PerformanceCounterPermissionEntry value)
 {
     return(default(int));
 }
コード例 #31
0
 // 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);

        }
コード例 #33
0
 public int IndexOf(PerformanceCounterPermissionEntry value) {            
     return List.IndexOf(value);
 }
 public int Add(PerformanceCounterPermissionEntry value)
 {
     return(base.List.Add(value));
 }
コード例 #35
0
 // 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);
 }
	// Remove an element from this collection.
	public void Remove(PerformanceCounterPermissionEntry value)
			{
				((IList)this).Remove(value);
			}
コード例 #40
0
 public int IndexOf(PerformanceCounterPermissionEntry value)
 {
     throw new NotImplementedException();
 }
	internal void AddDirect(PerformanceCounterPermissionEntry value)
			{
				InnerList.Add(value);
			}
コード例 #42
0
 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);
			}
コード例 #44
0
 ///<internalonly/>
 internal void RemovePermissionAccess(PerformanceCounterPermissionEntry entry)
 {
     base.RemovePermissionAccess(entry.GetBaseEntry());
 }
コード例 #45
0
 // 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) {

        }
	// Insert an element into this collection.
	public void Insert(int index, PerformanceCounterPermissionEntry value)
			{
				((IList)this).Insert(index, value);
			}
 public bool Contains(PerformanceCounterPermissionEntry value)
 {
     return(default(bool));
 }
	// Add an element to this collection.
	public int Add(PerformanceCounterPermissionEntry value)
			{
				return ((IList)this).Add(value);
			}
コード例 #53
0
 internal void Add(PerformanceCounterPermissionEntry entry)
 {
     AddPermissionAccess(entry.ToResourceEntry());
 }
コード例 #54
0
 internal void Remove(PerformanceCounterPermissionEntry entry)
 {
     RemovePermissionAccess(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);
			}
コード例 #57
0
 // Get the index of a specific element in this collection.
 public int IndexOf(PerformanceCounterPermissionEntry value)
 {
     return(((IList)this).IndexOf(value));
 }