Ejemplo n.º 1
0
        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)));
        }
Ejemplo n.º 2
0
        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);
        }