共用方式為


FakeLoggerServiceCollectionExtensions.AddFakeLogging 方法

定義

多載

AddFakeLogging(IServiceCollection)

使用預設選項設定假記錄。

AddFakeLogging(IServiceCollection, IConfigurationSection)

設定假記錄。

AddFakeLogging(IServiceCollection, Action<FakeLogCollectorOptions>)

設定假記錄。

AddFakeLogging(IServiceCollection)

來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs

使用預設選項設定假記錄。

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

參數

services
IServiceCollection

服務集合。

傳回

services 的值。

適用於

AddFakeLogging(IServiceCollection, IConfigurationSection)

來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs

設定假記錄。

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

參數

services
IServiceCollection

服務集合。

section
IConfigurationSection

包含的組 FakeLogCollectorOptions態區段。

傳回

services 的值。

適用於

AddFakeLogging(IServiceCollection, Action<FakeLogCollectorOptions>)

來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs
來源:
FakeLoggerServiceCollectionExtensions.cs

設定假記錄。

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

參數

services
IServiceCollection

服務集合。

configure
Action<FakeLogCollectorOptions>

記錄組態選項。

傳回

services 的值。

適用於