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
dataSourceIdentifierstringThe unique identifier for the DataSource.
dataSourceDataSourceWhen 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.