Class ApplicationContext (1.68.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
Type Description
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
Name Description
loggerToRegister ILogger
Exceptions
Type Description
InvalidOperationException

Thrown if a logger was already registered.