Class ApplicationContext
Defines the context in which this library runs. It allows setting up custom loggers.
Inherited Members
Namespace: Google
Assembly: Google.Apis.Core.dll
Syntax
public static class ApplicationContext
Properties
Logger
Returns the logger used within this application context.
Declaration
public static ILogger Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Remarks
It creates a NullLogger if no logger was registered previously
Methods
RegisterLogger(ILogger)
Registers a logger with this application context.
Declaration
public static void RegisterLogger(ILogger loggerToRegister)
Parameters
Type | Name | Description |
---|---|---|
ILogger | loggerToRegister |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if a logger was already registered. |