Table of Contents

Method TryGetDataSource

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

TryGetDataSource(string, out DataSource)

Attempts to retrieve a registered DataSource by its identifier.

public bool TryGetDataSource(string dataSourceIdentifier, out DataSource dataSource)

Parameters

dataSourceIdentifier string

The unique identifier of the DataSource to retrieve.

dataSource DataSource

When this method returns, contains the DataSource with the specified identifier if found; otherwise, null.

Returns

bool

true if a matching DataSource was found; otherwise, false.

Exceptions

ArgumentNullException

Thrown if dataSourceIdentifier is null, empty, or whitespace.