private static AceInfo CreateAce(string src) { // "+U1:____++++ var localOnly = src[0] != '+'; var a = src.Substring(1).Split(':'); ulong allowBits; ulong denyBits; Tools.ParsePermissions(a[1], out allowBits, out denyBits); return(new AceInfo { LocalOnly = localOnly, IdentityId = GetId(a[0]), AllowBits = allowBits, DenyBits = denyBits }); }
private static AceInfo CreateAce(string src) { // "Normal|+U1:____++++ var segments = src.Split('|'); Enum.TryParse <EntryType>(segments[0], true, out var entryType); var localOnly = segments[1][0] != '+'; var a = segments[1].Substring(1).Split(':'); Tools.ParsePermissions(a[1], out var allowBits, out var denyBits); return(new AceInfo { EntryType = entryType, LocalOnly = localOnly, IdentityId = GetId(a[0]), AllowBits = allowBits, DenyBits = denyBits }); }