Exemplo n.º 1
0
        private static RowEntry ConvertToRowEntry(AclTableEntry.ModifyOperation aclModifyOperation)
        {
            switch (aclModifyOperation.Operation)
            {
            case ModifyTableOperationType.Add:
                return(RowEntry.Add(new PropValue[]
                {
                    new PropValue(PropTag.EntryId, aclModifyOperation.Entry.MemberEntryId),
                    new PropValue(PropTag.MemberRights, aclModifyOperation.Entry.MemberRights)
                }));

            case ModifyTableOperationType.Modify:
                return(RowEntry.Modify(new PropValue[]
                {
                    new PropValue(PropTag.MemberId, aclModifyOperation.Entry.MemberId),
                    new PropValue(PropTag.MemberRights, aclModifyOperation.Entry.MemberRights)
                }));

            case ModifyTableOperationType.Remove:
                return(RowEntry.Remove(new PropValue[]
                {
                    new PropValue(PropTag.MemberId, aclModifyOperation.Entry.MemberId)
                }));

            default:
                return(RowEntry.Empty());
            }
        }
Exemplo n.º 2
0
 public static RowEntry Update(long memberId, int rights)
 {
     PropValue[] propValues = new PropValue[]
     {
         new PropValue(PropTag.MemberId, memberId),
         new PropValue(PropTag.MemberRights, rights)
     };
     return(RowEntry.Modify(propValues));
 }