Class LocalConfigSource<T>
Configuration source for local files.
Inherited Members
Namespace: Cognite.Extractor.Utils.Unstable.Configuration
Assembly: ExtractorUtils.dll
Syntax
public class LocalConfigSource<T> : ConfigSource<T> where T : VersionedConfig
Type Parameters
Name | Description |
---|---|
T | Type of config object to load. |
Constructors
| Edit this page View SourceLocalConfigSource(ILogger?, string)
Constructor.
Declaration
public LocalConfigSource(ILogger? logger, string configFilePath)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logger |
string | configFilePath | Path to local config file. |
Properties
| Edit this page View SourceConfigFilePath
The path to the config file this source will read from.
Declaration
public string ConfigFilePath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetConfigWrapper()
Get a wrapper around configuration with information about the remote revision if applicable. This will fail if a config has not been loaded.
Declaration
public override ConfigWrapper<T> GetConfigWrapper()
Returns
Type | Description |
---|---|
ConfigWrapper<T> |
Overrides
| Edit this page View SourceResolveConfig(int?, BaseErrorReporter, CancellationToken)
Load configuration, either from a local file or from CDF.
Declaration
public override Task<bool> ResolveConfig(int? targetRevision, BaseErrorReporter reporter, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
int? | targetRevision | Revision to load. Ignored for local config. Null means load the latest. |
BaseErrorReporter | reporter | Error reporter for writing configuration errors to CDF. |
CancellationToken | token | Cancellation token |
Returns
Type | Description |
---|---|
Task<bool> | True if a new configuration file was loaded, false otherwise. |