SecurityPrincipal
Represents the principal that can be used in security statement body.
using System;
namespace Microsoft.SqlServer.TransactSql.ScriptDom
{
[Serializable]
public class SecurityPrincipal : TSqlFragment
{
private PrincipalType _principalType;
private Identifier _identifier;
public PrincipalType PrincipalType {
get {
return _principalType;
}
set {
_principalType = value;
}
}
public Identifier Identifier {
get {
return _identifier;
}
set {
UpdateTokenInfo(value);
_identifier = value;
}
}
public override void Accept(TSqlFragmentVisitor visitor)
{
visitor?.ExplicitVisit(this);
}
public override void AcceptChildren(TSqlFragmentVisitor visitor)
{
if (Identifier != null)
Identifier.Accept(visitor);
base.AcceptChildren(visitor);
}
}
}