Пример #1
0
        public int CompareTo(object obj)
        {
            ACL peer = (ACL)obj;

            if (peer == null)
            {
                throw new InvalidOperationException("Comparing different types of records.");
            }
            int ret = 0;

            ret = (Perms == peer.Perms)? 0 :((Perms < peer.Perms)?-1:1);
            if (ret != 0)
            {
                return(ret);
            }
            ret = Id.CompareTo(peer.Id);
            if (ret != 0)
            {
                return(ret);
            }
            return(ret);
        }
Пример #2
0
 public void Deserialize(IInputArchive a_, String tag)
 {
     a_.StartRecord(tag);
     {
         IIndex vidx1 = a_.StartVector("acl");
         if (vidx1 != null)
         {
             var tmpLst = new System.Collections.Generic.List <ACL>();
             for (; !vidx1.Done(); vidx1.Incr())
             {
                 ACL e1;
                 e1 = new ACL();
                 a_.ReadRecord(e1, "e1");
                 tmpLst.Add(e1);
             }
             Acl = tmpLst;
         }
         a_.EndVector("acl");
     }
     Stat = new Stat();
     a_.ReadRecord(Stat, "stat");
     a_.EndRecord(tag);
 }
Пример #3
0
 public void Deserialize(IInputArchive a_, String tag)
 {
     a_.StartRecord(tag);
     Path = a_.ReadString("path");
     Data = a_.ReadBuffer("data");
     {
         IIndex vidx1 = a_.StartVector("acl");
         if (vidx1 != null)
         {
             var tmpLst = new System.Collections.Generic.List <ACL>();
             for (; !vidx1.Done(); vidx1.Incr())
             {
                 ACL e1;
                 e1 = new ACL();
                 a_.ReadRecord(e1, "e1");
                 tmpLst.Add(e1);
             }
             Acl = tmpLst;
         }
         a_.EndVector("acl");
     }
     Flags = a_.ReadInt("flags");
     a_.EndRecord(tag);
 }