LoggingBuilderExtensions.AddProvider(ILoggingBuilder, ILoggerProvider) 方法

定义

将给定 ILoggerProvider 添加到 ILoggingBuilder

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

参数

builder
ILoggingBuilder

要向其添加 providerILoggingBuilder

provider
ILoggerProvider

要添加到 builderILoggerProvider

返回

ILoggingBuilder,以便可以链接其他调用。

适用于