protected SecurityPrincipal(SerializationInfo info, StreamingContext context) { this.profile = info.GetValue("Profile", typeof(IUserProfile)) as IUserProfile; this.identity = info.GetValue("Identity", typeof(SecurityIdentity)) as SecurityIdentity; this.roleList = info.GetValue("Roles", typeof(IList <string>)) as IList <string>; }
public SecurityPrincipal(SecurityIdentity identity, string[] roles) { this.identity = identity; this.roleList = new List <string>(roles); }