public CredentialPrincipal(CredentialIdentity identity, params string[] roles) { if(identity == null) throw new ArgumentNullException("identity"); _identity = identity; _roles = roles; }
public CredentialPrincipal(Credential credential, params string[] roles) { _identity = new CredentialIdentity(credential); if (roles != null && roles.Length > 0) { _roles = new HashSet <string>(roles, StringComparer.OrdinalIgnoreCase); } }
public CredentialPrincipal(CredentialIdentity identity, params string[] roles) { if (identity == null) { throw new ArgumentNullException("identity"); } _identity = identity; _roles = roles; }