共用方式為


FakeLoggerBuilderExtensions.AddFakeLogging 方法

定義

多載

AddFakeLogging(ILoggingBuilder)

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

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

設定假的記錄。

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

設定假的記錄。

AddFakeLogging(ILoggingBuilder)

來源:
FakeLoggerBuilderExtensions.cs
來源:
FakeLoggerBuilderExtensions.cs

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

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

參數

builder
ILoggingBuilder

記錄產生器。

傳回

記錄 builder

適用於

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

來源:
FakeLoggerBuilderExtensions.cs
來源:
FakeLoggerBuilderExtensions.cs

設定假的記錄。

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

參數

builder
ILoggingBuilder

記錄產生器。

section
IConfigurationSection

包含的 FakeLogCollectorOptions組態區段。

傳回

記錄 builder

適用於

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

來源:
FakeLoggerBuilderExtensions.cs
來源:
FakeLoggerBuilderExtensions.cs

設定假的記錄。

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

參數

builder
ILoggingBuilder

記錄產生器。

configure
Action<FakeLogCollectorOptions>

記錄組態選項。

傳回

記錄 builder

適用於