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
的值。