Table of Contents

Method TryGetDataSource

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

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 string

The unique identifier for the DataSource.

dataSource DataSource

When 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.