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