/// <summary> /// Initializes a new instance of the <see cref="SigningBindingElementChain"/> class. /// </summary> /// <param name="signers"> /// The signing binding elements that may be used for some outgoing message, /// in preferred use order. /// </param> internal SigningBindingElementChain(ITamperProtectionChannelBindingElement[] signers) { Requires.NotNullOrEmpty(signers, "signers"); Requires.NullOrNotNullElements(signers, "signers"); Requires.That(signers.Select(s => s.Protection).Distinct().Count() == 1, "signers", OAuthStrings.SigningElementsMustShareSameProtection); this.signers = signers; }
/// <summary> /// Initializes a new instance of the <see cref="SigningBindingElementChain"/> class. /// </summary> /// <param name="signers"> /// The signing binding elements that may be used for some outgoing message, /// in preferred use order. /// </param> internal SigningBindingElementChain(ITamperProtectionChannelBindingElement[] signers) { Contract.Requires<ArgumentNullException>(signers != null); Contract.Requires<ArgumentException>(signers.Length > 0); Contract.Requires<ArgumentException>(!signers.Contains(null), MessagingStrings.SequenceContainsNullElement); Contract.Requires<ArgumentException>(signers.Select(s => s.Protection).Distinct().Count() == 1, OAuthStrings.SigningElementsMustShareSameProtection); this.signers = signers; }