示例#1
0
        public static void SetItemACL(string keyring, int id, ICollection acls)
        {
            if (acls == null)
            {
                throw new ArgumentNullException("acls");
            }

            ItemACL [] arr = new ItemACL [acls.Count];
            acls.CopyTo(arr, 0);
            SetItemACL(keyring, id, arr);
        }
示例#2
0
		public static void SetItemACL (string keyring, int id, ItemACL [] acls)
		{
			if (keyring == null)
				throw new ArgumentNullException ("keyring");

			if (acls == null)
				throw new ArgumentNullException ("acls");

			if (acls.Length == 0)
				throw new ArgumentException ("Empty ACL set.", "acls");

			RequestMessage req = new RequestMessage ();
			req.StartOperation (Operation.SetItemACL);
			req.Write (keyring);
			req.Write (id);
			req.Write (acls.Length);
			foreach (ItemACL acl in acls) {
				req.Write (acl.DisplayName);
				req.Write (acl.FullPath);
				req.Write ((int) acl.Access);
			}
			req.EndOperation ();
			SendRequest (req.Stream);
		}
示例#3
0
		public static void SetItemACL (string keyring, int id, ICollection acls)
		{
			if (acls == null)
				throw new ArgumentNullException ("acls");

			ItemACL [] arr = new ItemACL [acls.Count];
			acls.CopyTo (arr, 0);
			SetItemACL (keyring, id, arr);
		}
示例#4
0
		public static void SetItemACL (string keyring, int id, ItemACL [] acls)
		{
			if (keyring == null)
				throw new ArgumentNullException ("keyring");

			if (acls == null)
				throw new ArgumentNullException ("acls");

			if (acls.Length == 0)
				throw new ArgumentException ("Empty ACL set.", "acls");
		}