共用方式為


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,以便鏈結其他呼叫。

適用於