コード例 #1
0
		internal ServiceControllerPermissionEntryCollection (ServiceControllerPermission owner)
		{
			this.owner = owner;
			ResourcePermissionBaseEntry[] entries = owner.GetEntries ();
			if (entries.Length > 0) {
				foreach (ResourcePermissionBaseEntry entry in entries) {
					ServiceControllerPermissionAccess scpa = (ServiceControllerPermissionAccess) entry.PermissionAccess;
					string machine = entry.PermissionAccessPath [0];
					string service = entry.PermissionAccessPath [1];
					ServiceControllerPermissionEntry scpe = new ServiceControllerPermissionEntry (scpa, machine, service);
					// we don't want to add them (again) to the base class
					InnerList.Add (scpe);
				}
			}
		}
コード例 #2
0
 internal ServiceControllerPermissionEntryCollection(ServiceControllerPermission owner)
 {
     this.owner = owner;
     ResourcePermissionBaseEntry[] entries = owner.GetEntries();
     if (entries.Length > 0)
     {
         foreach (ResourcePermissionBaseEntry entry in entries)
         {
             ServiceControllerPermissionAccess scpa = (ServiceControllerPermissionAccess)entry.PermissionAccess;
             string machine = entry.PermissionAccessPath [0];
             string service = entry.PermissionAccessPath [1];
             ServiceControllerPermissionEntry scpe = new ServiceControllerPermissionEntry(scpa, machine, service);
             // we don't want to add them (again) to the base class
             InnerList.Add(scpe);
         }
     }
 }