/// <summary> /// Creates a new ACE instance. /// @param type ACE type. /// @return ACE. /// </summary> public static Ace NewInstance(AceType type) { Ace ace = new Ace(); ace.SetType(type); return(ace); }
/// <summary> /// Load the ACL from the buffer returning the last ACL segment position into the buffer. /// @param buff source buffer. /// @param start start loading position. /// @return last loading position. /// </summary> public void Parse(BinaryReader buff, long start) { buff.BaseStream.Seek(start, SeekOrigin.Begin); // read for Dacl byte[] bytes = NumberFacility.GetBytes(buff.ReadInt32()); this.revision = AclRevisionExtension.ParseValue(bytes[0]); bytes = NumberFacility.GetBytes(buff.ReadInt32()); int aceCount = NumberFacility.GetInt(bytes[1], bytes[0]); for (var i = 0; i < aceCount; i++) { Ace ace = new Ace(); this.aces.Add(ace); ace.Parse(buff); } }