示例#1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="roleAccessor">Role Property Accessor this instance will be returned by</param>
        /// <param name="memberships">Other roles to participate in</param>
        /// <param name="exclusions">Roles of which this role is excluded</param>
        public RoleExpression(Expression<Func<IRole>> roleAccessor, IRole[] memberships, IRole[] exclusions)
        {
            Name = BindingHelper.Name(roleAccessor);

            RoleMemberships = memberships.ToDictionary(r => r.Name);
            RoleExclusions = exclusions.ToDictionary(r => r.Name);
        }