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; } }
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); }