FakeLoggerBuilderExtensions.AddFakeLogging 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddFakeLogging(ILoggingBuilder) |
使用預設選項設定假記錄。 |
AddFakeLogging(ILoggingBuilder, IConfigurationSection) |
設定假的記錄。 |
AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>) |
設定假的記錄。 |
AddFakeLogging(ILoggingBuilder)
使用預設選項設定假記錄。
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)
設定假的記錄。
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>)
設定假的記錄。
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
。