Exemple #1
0
        private HashSet <EntityMemberInfo> GetModifiedMembers()
        {
            var result = new HashSet <EntityMemberInfo>();

            if (_maskMembersChanged == null)
            {
                return(result);
            }
            foreach (var member in EntityInfo.Members)
            {
                if (_maskMembersChanged.IsSet(member))
                {
                    result.Add(member);
                }
            }
            return(result);
        }
Exemple #2
0
        public bool Allowed(EntityMemberInfo member)
        {
            //TODO: put it into Member Masks
            if (member.Flags.IsSet(EntityMemberFlags.IsSystem))
            {
                return(true);
            }
            switch (Status)
            {
            case PermissionStatus.Denied: return(false);

            case PermissionStatus.AllowMasked: return(Mask.IsSet(member));

            case PermissionStatus.AllowAll: return(true);
            }
            return(true);
        }