public override T CreateKeyIdentifierClause <T>() { if (InternalTokenReference != null && typeof(T) == InternalTokenReference.GetType()) { return((T)InternalTokenReference); } if (ExternalTokenReference != null && typeof(T) == ExternalTokenReference.GetType()) { return((T)ExternalTokenReference); } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenException(SR.Format(SR.UnableToCreateTokenReference))); }
public override bool CanCreateKeyIdentifierClause <T>() { if (InternalTokenReference != null && typeof(T) == InternalTokenReference.GetType()) { return(true); } if (ExternalTokenReference != null && typeof(T) == ExternalTokenReference.GetType()) { return(true); } return(false); }