Passing multiple Attaribute values in Single Saml Attribute -Array or List like data

I want to generate saml as below and I am using below C# .Net code using ComponentSpace.SAML Version 2.1
I am pasting section code I am using to generate this but not sure how to add Array like or list like data in attribute i.e. multiple attribute values inside attaribute as below.
Please help here.
AttributeStatement attStatement = new AttributeStatement();
foreach (SAMLModuleAttribute attb in lstAttributes)
{
attStatement.Attributes.Add(new SAMLAttribute(attb.AttributeName, SAMLIdentifiers.AttributeNameFormats.Basic, attb.FriendlyName, attb.AttributeValue));
}

I also tried attStatement.Attributes.Add(new SAMLAttribute(attb.AttributeName, SAMLIdentifiers.AttributeNameFormats.Unspecified, null, “xs:string”, attb.AttributeValue))
but it doesn’t allowed as it goves compile time error SAMLAttribute does not take contain a constructor that takes 5 arguments.”
In above code AttributeName=Entity
and AttributeValue s will be >entity-value1 and entity-desc1 etc.
Please help me to resolve this.
<saml:Attribute Name=“Entity” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”>
<saml:AttributeValue xsi:type=“xs:string”>entity-value1</saml:AttributeValue>
<saml:AttributeValue xsi:type=“xs:string”>entity-desc1</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name=“Entity” NameFormat=“urn:oasis:names:tc:SAML:2.0:attrname-format:basic”>
<saml:AttributeValue xsi:type=“xs:string”>entity-value2</saml:AttributeValue>
<saml:AttributeValue xsi:type=“xs:string”>entity-desc2</saml:AttributeValue>
</saml:Attribute>

Thanks,
Amol

Version 2.1 is quite old so it’s possible the overload you’re trying to use doesn’t exist in that version.
The following code creates the two attributes each with the two specified attribute values.


SAMLAttribute samlAttribute = new SAMLAttribute();
samlAttribute.Name = “Entity”;
samlAttribute.NameFormat = SAMLIdentifiers.AttributeNameFormats.Basic;
samlAttribute.Values.Add(new AttributeValue(“xs:string”, “entity-value1”));
samlAttribute.Values.Add(new AttributeValue(“xs:string”, “entity-desc1”));

attributeStatement.Attributes.Add(samlAttribute);

samlAttribute = new SAMLAttribute();
samlAttribute.Name = “Entity”;
samlAttribute.NameFormat = SAMLIdentifiers.AttributeNameFormats.Basic;
samlAttribute.Values.Add(new AttributeValue(“xs:string”, “entity-value2”));
samlAttribute.Values.Add(new AttributeValue(“xs:string”, “entity-desc2”));

attributeStatement.Attributes.Add(samlAttribute);


[quote]
ComponentSpace - 4/24/2018
Version 2.1 is quite old so it's possible the overload you're trying to use doesn't exist in that version.
The following code creates the two attributes each with the two specified attribute values.


SAMLAttribute samlAttribute = new SAMLAttribute();
samlAttribute.Name = "Entity";
samlAttribute.NameFormat = SAMLIdentifiers.AttributeNameFormats.Basic;
samlAttribute.Values.Add(new AttributeValue("xs:string", "entity-value1"));
samlAttribute.Values.Add(new AttributeValue("xs:string", "entity-desc1"));

attributeStatement.Attributes.Add(samlAttribute);

samlAttribute = new SAMLAttribute();
samlAttribute.Name = "Entity";
samlAttribute.NameFormat = SAMLIdentifiers.AttributeNameFormats.Basic;
samlAttribute.Values.Add(new AttributeValue("xs:string", "entity-value2"));
samlAttribute.Values.Add(new AttributeValue("xs:string", "entity-desc2"));

attributeStatement.Attributes.Add(samlAttribute);


[/quote]

Hey Thanks a lot it worked for me and now I can add multiple AttributeValue inside single Attribute. But only one thing is missing.The AttributeValue doesn't have xsi:type="xs:string" which I tried to add it using be;pw code you have suggested but it den't allow me to add it as at cimplile time as it shows only 2 overloads 1. AttributeValue(object) and 2. AttributeValue(XmlElement , IAttributeValueSerializer)
Can you please help here.
samlAttribute.Values.Add(new AttributeValue(
"xs:string", "entity-value2"));
samlAttribute.Values.Add(new AttributeValue("
xs:string", "entity-desc2"));



entity-value1
entity-desc1

The above code does include the xs:string type in the generated XML.
If you’re using v2.1, I suggest upgrading to the latest release.
https://www.componentspace.com/documentation/saml-for-asp-net/ComponentSpace%20SAML%20for%20ASP.NET%20Release%20Notes.pdf