Class ServerConfigurationProvider
- Namespace
- Acuit.Pinpoint.Configuration
- Assembly
- Acuit.Pinpoint.Configuration.dll
A Pinpoint Server configuration provider.
public abstract class ServerConfigurationProvider : ConfigurationProvider, IConfigurationProvider
- Inheritance
-
ServerConfigurationProvider
- Implements
- Inherited Members
Methods
GetLocalFileNameAsync(string)
Asynchronously gets the full path to a local file for the specified configuration setting.
public Task<string> GetLocalFileNameAsync(string serverFileName)
Parameters
serverFileName
stringThe server file name.
Returns
- Task<string>
A task that represents the asynchronous operation. The value of its Result property contains the full path to a local file.
Remarks
RegisterServerFileRetriever(IServerFileRetriever) must be used to register a server 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 Pinpoint Server and this method is being called from Pinpoint Workstation, the file will be retrieved and stored locally.
Exceptions
- ArgumentNullException
serverFileName
is null.- InvalidOperationException
A server file retriever has not been registered, or the setting does not exist.
- CommunicationException
A communication error occurred while attempting to retrieve the file from the server, or Acuit Pinpoint Server could not read the file.
- TimeoutException
Timed out while attempting to retrieve the file from the server.
RegisterServerFileRetriever(IServerFileRetriever)
Registers the server file retriever.
public static void RegisterServerFileRetriever(IServerFileRetriever serverFileRetriever)
Parameters
serverFileRetriever
IServerFileRetrieverThe server file retriever.
Remarks
This must be done before GetLocalFileNameAsync(string) (or GetLocalFileNameAsync(IConfigurationRoot, string)) can be used.