Method TryGetDataSource
TryGetDataSource(string, out DataSource)
Attempts to retrieve the DataSource with the specified identifier without creating a new one.
public bool TryGetDataSource(string dataSourceIdentifier, out DataSource dataSource)
Parameters
dataSourceIdentifier
stringThe unique identifier for the DataSource.
dataSource
DataSourceWhen this method returns, contains the DataSource associated with the identifier if found; otherwise, null.
Returns
- bool
True if a DataSource with the specified identifier was found; otherwise, false.
Exceptions
- ArgumentNullException
Thrown if the identifier is null, empty, or white space.