OdsoRecipientDataCollection Class

A typed collection of OdsoRecipientData
Inheritance Hierarchy
SystemObject
  Aspose.Words.SettingsOdsoRecipientDataCollection

Namespace:  Aspose.Words.Settings
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public class OdsoRecipientDataCollection : IEnumerable<OdsoRecipientData>, 
	IEnumerable

The OdsoRecipientDataCollection type exposes the following members.

Constructors
  NameDescription
Public methodOdsoRecipientDataCollection
Initializes a new instance of the OdsoRecipientDataCollection class
Properties
  NameDescription
Public propertyCode exampleCount
Gets the number of elements contained in the collection.
Public propertyCode exampleItem
Gets or sets an item in this collection.
Methods
  NameDescription
Public methodCode exampleAdd
Adds an object to the end of this collection.
Public methodCode exampleClear
Removes all elements from this collection.
Public methodEquals (Inherited from Object.)
Public methodCode exampleGetEnumerator
Returns an enumerator object that can be used to iterate over all items in the collection.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodCode exampleRemoveAt
Removes the element at the specified index.
Public methodToString (Inherited from Object.)
Remarks
Examples
Shows how to access the collection of data that designates merge data source records to be excluded from a merge.
Document doc = new Document(MyDir + "Odso data.docx");

// Records in this collection that do not have the "Active" flag set to true will be excluded from the mail merge
OdsoRecipientDataCollection odsoRecipientDataCollection = doc.MailMergeSettings.Odso.RecipientDatas;

Assert.AreEqual(70, odsoRecipientDataCollection.Count);
int index = 0;

foreach (OdsoRecipientData data in odsoRecipientDataCollection)
{
    Console.WriteLine($"Odso recipient data index #{index++}, will {(data.Active ? "" : "not ")}be imported upon mail merge.");
    Console.WriteLine($"\tColumn #{data.Column}");
    Console.WriteLine($"\tHash code: {data.Hash}");
    Console.WriteLine($"\tContents array length: {data.UniqueTag.Length}");

    Assert.AreNotEqual(data, data.Clone());
}
See Also