public override string ToString() { return($"{AuthorizationPrincipalRole.EncodePrincipalEnum(PrincipalType)}:{PrincipalId}"); }
public Principal(string s) { PrincipalId = s.Substring(2); PrincipalType = AuthorizationPrincipalRole.DecodePrincipalEnum(s.Substring(0, 1)); }