ToDataSetList

IptcRecordSet.ToDataSetList method

Creates a list of dataSets from the package.

public IReadOnlyList<IptcDataSet> ToDataSetList()

Return Value

A list that contains all IPTC dataSets from the package.

Examples

This example demonstrates how to read all IPTC IIM datasets from an IPTC metadata package.

using (Metadata metadata = new Metadata(Constants.PsdWithIptc))
{
    IIptc root = metadata.GetRootPackage() as IIptc;
    if (root != null && root.IptcPackage != null)
    {
        foreach (var dataSet in root.IptcPackage.ToDataSetList())
        {
            Console.WriteLine(dataSet.RecordNumber);
            Console.WriteLine(dataSet.DataSetNumber);
            Console.WriteLine(dataSet.AlternativeName);
            Console.WriteLine(dataSet.Value);
        }
    }
}

See Also