Class ServerConfigurationProvider
- Namespace
- Acuit.Pinpoint.Workstation.Configuration
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
An Acuit Pinpoint configuration provider.
public abstract class ServerConfigurationProvider : ConfigurationProvider, IConfigurationProvider
- Inheritance
-
ServerConfigurationProvider
- Implements
- Inherited Members
Constructors
ServerConfigurationProvider()
protected ServerConfigurationProvider()
Methods
GetLocalFileNameAsync(string)
Asynchronously gets the full path to a local file for the specified configuration setting.
public Task<string> GetLocalFileNameAsync(string serverFileName)
Parameters
serverFileNamestringThe name of the file on the Acuit Pinpoint host computer.
Returns
Remarks
Once the operation completes, the Result property on the returned task object contains the full path to a local file.
RegisterServerFileRetriever(IServerFileRetriever) must be used to register an Acuit Pinpoint host computer file retriever before this can be called.
serverFileName is expected to be the full path to a file, accessible from the system on which it is configured. If the file resides
on the Acuit Pinpoint host computer and this method is being called from Acuit Pinpoint Workstation, the file will be retrieved and stored locally.
Exceptions
- ArgumentNullException
serverFileNameis null.- InvalidOperationException
An Acuit Pinpoint host computer file retriever has not been registered, or the setting does not exist.
- Exception
Acuit Pinpoint responded with an error, or an error occurred while attempting to communicate with Acuit Pinpoint. See RetrieveFileAsync(string) for the specific errors that can occur.
RegisterServerFileRetriever(IServerFileRetriever)
Registers the Acuit Pinpoint host computer file retriever.
public static void RegisterServerFileRetriever(IServerFileRetriever serverFileRetriever)
Parameters
serverFileRetrieverIServerFileRetrieverThe Acuit Pinpoint host computer file retriever.
Remarks
This must be done before GetLocalFileNameAsync(string) (or GetLocalFileNameAsync(IConfigurationRoot, string)) can be used.