共用方式為


FakeLoggerServiceCollectionExtensions.AddFakeLogging Method

Definition

Overloads

AddFakeLogging(IServiceCollection)

Configures fake logging with default options.

AddFakeLogging(IServiceCollection, IConfigurationSection)

Configures fake logging.

AddFakeLogging(IServiceCollection, Action<FakeLogCollectorOptions>)

Configures fake logging.

AddFakeLogging(IServiceCollection)

Source:
FakeLoggerServiceCollectionExtensions.cs

Configures fake logging with default options.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddFakeLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFakeLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddFakeLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddFakeLogging (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

Service collection.

Returns

The value of services.

Applies to

AddFakeLogging(IServiceCollection, IConfigurationSection)

Source:
FakeLoggerServiceCollectionExtensions.cs

Configures fake logging.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddFakeLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFakeLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddFakeLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddFakeLogging (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection

Parameters

services
IServiceCollection

Service collection.

section
IConfigurationSection

Configuration section that contains FakeLogCollectorOptions.

Returns

The value of services.

Applies to

AddFakeLogging(IServiceCollection, Action<FakeLogCollectorOptions>)

Source:
FakeLoggerServiceCollectionExtensions.cs

Configures fake logging.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddFakeLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Logging::Testing::FakeLogCollectorOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFakeLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions> configure);
static member AddFakeLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Logging.Testing.FakeLogCollectorOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddFakeLogging (services As IServiceCollection, configure As Action(Of FakeLogCollectorOptions)) As IServiceCollection

Parameters

services
IServiceCollection

Service collection.

configure
Action<FakeLogCollectorOptions>

Logging configuration options.

Returns

The value of services.

Applies to