Method TryGetDataSource
TryGetDataSource(string, out DataSource)
Attempts to retrieve a registered DataSource by its identifier.
public bool TryGetDataSource(string dataSourceIdentifier, out DataSource dataSource)
Parameters
dataSourceIdentifierstringThe unique identifier of the DataSource to retrieve.
dataSourceDataSourceWhen this method returns, contains the DataSource with the specified identifier if found; otherwise,
null.
Returns
- bool
trueif a matching DataSource was found; otherwise,false.
Exceptions
- ArgumentNullException
Thrown if
dataSourceIdentifierisnull, empty, or whitespace.