void EnsureCapacityToAddToken()
 {
     if (this.tokenCount == this.tokens.Length)
     {
         SecurityTokenEntry[] newTokens = new SecurityTokenEntry[this.tokens.Length * 2];
         Array.Copy(this.tokens, 0, newTokens, 0, this.tokenCount);
         this.tokens = newTokens;
     }
 }
 void EnsureCapacityToAddToken()
 {
     if (this.tokenCount == this.tokens.Length)
     {
         SecurityTokenEntry[] newTokens = new SecurityTokenEntry[this.tokens.Length * 2];
         Array.Copy(this.tokens, 0, newTokens, 0, this.tokenCount);
         this.tokens = newTokens;
     }
 }
 private void EnsureCapacityToAddToken()
 {
     if (this.tokenCount == this.tokens.Length)
     {
         SecurityTokenEntry[] destinationArray = new SecurityTokenEntry[this.tokens.Length * 2];
         Array.Copy(this.tokens, 0, destinationArray, 0, this.tokenCount);
         this.tokens = destinationArray;
     }
 }
 private void EnsureCapacityToAddToken()
 {
     if (_tokenCount == _tokens.Length)
     {
         SecurityTokenEntry[] newTokens = new SecurityTokenEntry[_tokens.Length * 2];
         Array.Copy(_tokens, 0, newTokens, 0, _tokenCount);
         _tokens = newTokens;
     }
 }
예제 #5
0
 private void EnsureCapacityToAddToken()
 {
     if (this.tokenCount == this.tokens.Length)
     {
         SecurityTokenEntry[] destinationArray = new SecurityTokenEntry[this.tokens.Length * 2];
         Array.Copy(this.tokens, 0, destinationArray, 0, this.tokenCount);
         this.tokens = destinationArray;
     }
 }
        public void Add(SecurityToken token, SecurityTokenReferenceStyle allowedReferenceStyle, SecurityTokenParameters tokenParameters)
        {
            if (token == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(token));
            }

            if ((allowedReferenceStyle == SecurityTokenReferenceStyle.External) && (tokenParameters == null))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(SR.ResolvingExternalTokensRequireSecurityTokenParameters);
            }

            EnsureCapacityToAddToken();
            _tokens[_tokenCount++] = new SecurityTokenEntry(token, tokenParameters, allowedReferenceStyle);
        }