/// <summary> /// Creates an instance of SecurePrincipal with an existing <c>SecureIdentity</c>, and an initial collection of roles. /// </summary> /// <param name="identity"></param> /// <param name="roles"></param> public SecurePrincipal(SecureIdentity identity, string[] roles) { _identity = identity; _roles = new List<string>(); foreach (string s in roles) if (!string.IsNullOrEmpty(s)) _roles.Add(s); }
/// <summary> /// Creates an instance of SecurePrincipal with an existing <c>SecureIdentity</c>, and an initial collection of roles. /// </summary> /// <param name="identity"></param> /// <param name="roles"></param> public SecurePrincipal(SecureIdentity identity, string[] roles) { _identity = identity; _roles = new List <string>(); foreach (string s in roles) { if (!string.IsNullOrEmpty(s)) { _roles.Add(s); } } }