//----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System; using System.Collections.Generic; using System.Collections.ObjectModel; /// /// Represents the AttributeStatement element specified in [Saml2Core, 2.7.3]. /// public class Saml2AttributeStatement : Saml2Statement { private Collection attributes = new Collection(); /// /// Creates an instance of Saml2AttributeStatement. /// public Saml2AttributeStatement() { } /// /// Creates an instance of Saml2AttributeStatement. /// /// The contained in this statement. public Saml2AttributeStatement(Saml2Attribute attribute) : this(new Saml2Attribute[] { attribute }) { } /// /// Creates an instance of Saml2AttributeStatement. /// /// The collection of elements contained in this statement. public Saml2AttributeStatement(IEnumerable attributes) { if (attributes == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("attributes"); } foreach (Saml2Attribute attribute in attributes) { if (attribute == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("attributes"); } this.attributes.Add(attribute); } } /// /// Gets the collection of of this statement. [Saml2Core, 2.7.3] /// public Collection Attributes { get { return this.attributes; } } } }