Class ApplicationContext (1.60.0)

public static class ApplicationContext

Defines the context in which this library runs. It allows setting up custom loggers.

Inheritance

object > ApplicationContext

Namespace

Google

Assembly

Google.Apis.Core.dll

Properties

Logger

public static ILogger Logger { get; }

Returns the logger used within this application context.

Property Value
TypeDescription
ILogger
Remarks

It creates a NullLogger if no logger was registered previously

Methods

RegisterLogger(ILogger)

public static void RegisterLogger(ILogger loggerToRegister)

Registers a logger with this application context.

Parameter
NameDescription
loggerToRegisterILogger
Exceptions
TypeDescription
System.InvalidOperationException

Thrown if a logger was already registered.