/// <summary> /// Creates an instance of Saml2AttributeStatement. /// </summary> /// <param name="attribute">The <see cref="Saml2Attribute"/> contained in this statement.</param> /// <exception cref="ArgumentNullException">if <paramref name="attribute"/> is null.</exception> public Saml2AttributeStatement(Saml2Attribute attribute) { if (attribute == null) { throw LogArgumentNullException(nameof(attribute)); } Attributes = new List <Saml2Attribute> { attribute }; }
public AttributeKey(Saml2Attribute attribute) { if (attribute == null) { throw LogArgumentNullException(nameof(attribute)); } FriendlyName = attribute.FriendlyName ?? string.Empty; Name = attribute.Name; NameFormat = attribute.NameFormat == null ? string.Empty : attribute.NameFormat.OriginalString; ValueType = attribute.AttributeValueXsiType ?? string.Empty; OriginalIssuer = attribute.OriginalIssuer ?? string.Empty; _hashCode = ComputeHashCode(); }