Show / Hide Table of Contents

Class ApplicationContext

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

Inheritance
System.Object
ApplicationContext
Namespace: Google
Assembly: Google.Apis.Core.dll
Syntax
public static class ApplicationContext : object

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
System.InvalidOperationException

Thrown if a logger was already registered.

Back to top