PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­Configuration­ManagerConfigure­From­Xml­With­Auto­Reload­Async
Open sandboxFocus

Method ConfigureFromXmlWithAutoReloadAsync

ConfigureFromXmlWithAutoReloadAsync(LoggingBackend, Uri, TimeSpan, CancellationToken)

Configures a LoggingBackend from an XML configuration file whose location is specified in a Uri and specifies a TimeSpan at which the file should be refreshed from source.

public static Task<IDisposable> ConfigureFromXmlWithAutoReloadAsync([Required] this LoggingBackend backend, Uri uri, TimeSpan autoReloadPeriod, CancellationToken cancellationToken = null)
Type Name Description
LoggingBackend backend

The backend to configure.

Uri uri

The location of the configuration file. The schema is described in the LoggingConfigurationModel type. If you're using a cloud storage service, this should be a direct download link.

TimeSpan autoReloadPeriod

The TimeSpan after which the configuration should be reloaded. If this parameter equals zero or TimeSpan.MaxValue, the configuration is never reloaded.

CancellationToken cancellationToken

A CancellationToken.

Type Description

An opaque IDisposable that must be disposed to stop reloading the configuration.