示例#1
0
        public Boolean IsEqual(RoleMembership compareMembership)
        {
            Boolean isEqual = true;

            isEqual = isEqual && (securityAuthorityId == compareMembership.SecurityAuthorityId);

            isEqual = isEqual && (securityGroupId == compareMembership.SecurityGroupId);

            return(isEqual);
        }
示例#2
0
        public void AddMembership(Int64 securityAuthorityId, String securityAuthorityName, String securityGroupId, String securityGroupName)
        {
            if (!MembershipExists(securityAuthorityId, securityGroupId))
            {
                RoleMembership newMembership = new RoleMembership(application);

                newMembership.RoleId = roleId;

                newMembership.SecurityAuthorityId = securityAuthorityId;

                newMembership.SecurityAuthorityName = securityAuthorityName;

                newMembership.SecurityGroupId = securityGroupId;

                newMembership.SecurityGroupName = securityGroupName;

                membership.Add(newMembership);
            }

            return;
        }