DataSourceInfo
Leave feedback
On this page
Creates a new instance of this class without any properties specified.
public DataSourceInfo()
- class DataSourceInfo
- namespace GroupDocs.Assembly
- assembly GroupDocs.Assembly
Creates a new instance of this class with the data source object specified.
public DataSourceInfo(object dataSource)
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | The data source object. |
The data source object can be of one of the following types:
XmlDataSourceJsonDataSourceCsvDataSourceDocumentTableSetDocumentTable- DataSet
- DataTable
- DataRow
- IDataReader
- IDataRecord
- DataView
- DataRowView
- Any other arbitrary non-dynamic and non-anonymous .NET type
For information on how to work with data sources of different types in template documents, see template syntax reference (https://docs.groupdocs.com/display/assemblynet/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).
- class DataSourceInfo
- namespace GroupDocs.Assembly
- assembly GroupDocs.Assembly
Creates a new instance of this class with the data source object and its name specified.
public DataSourceInfo(object dataSource, string name)
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | The data source object. |
| name | String | The name of the data source object to be used to access the data source object in a template document. |
The data source object can be of one of the following types:
XmlDataSourceJsonDataSourceCsvDataSourceDocumentTableSetDocumentTable- DataSet
- DataTable
- DataRow
- IDataReader
- IDataRecord
- DataView
- DataRowView
- Any other arbitrary non-dynamic and non-anonymous .NET type
For information on how to work with data sources of different types in template documents, see template syntax reference (https://docs.groupdocs.com/display/assemblynet/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).
When the name of the data source object is specified, you can access the data source object and its members in a template document using the name.
When the name of the data source object is null or empty, you can still access members of the data source object in a template document using context object member access (see Template Syntax Reference for more information), but you cannot access the data source object itself.
When passing multiple DataSourceInfo instances to DocumentAssembler, only the name of the first data source object can be null or empty. Names of the rest ones must be specified and unique.
- class DataSourceInfo
- namespace GroupDocs.Assembly
- assembly GroupDocs.Assembly
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.