LoggingScopeHttpMessageHandler 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
LoggingScopeHttpMessageHandler(ILogger) |
使用指定的記錄器,初始化 LoggingScopeHttpMessageHandler 類別的新實例。 |
LoggingScopeHttpMessageHandler(ILogger, HttpClientFactoryOptions) |
使用指定的記錄器和選項,初始化 LoggingScopeHttpMessageHandler 類別的新實例。 |
LoggingScopeHttpMessageHandler(ILogger)
使用指定的記錄器,初始化 LoggingScopeHttpMessageHandler 類別的新實例。
public:
LoggingScopeHttpMessageHandler(Microsoft::Extensions::Logging::ILogger ^ logger);
public LoggingScopeHttpMessageHandler (Microsoft.Extensions.Logging.ILogger logger);
new Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler : Microsoft.Extensions.Logging.ILogger -> Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler
Public Sub New (logger As ILogger)
參數
例外狀況
logger
null
。
適用於
LoggingScopeHttpMessageHandler(ILogger, HttpClientFactoryOptions)
使用指定的記錄器和選項,初始化 LoggingScopeHttpMessageHandler 類別的新實例。
public:
LoggingScopeHttpMessageHandler(Microsoft::Extensions::Logging::ILogger ^ logger, Microsoft::Extensions::Http::HttpClientFactoryOptions ^ options);
public LoggingScopeHttpMessageHandler (Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Http.HttpClientFactoryOptions options);
new Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler : Microsoft.Extensions.Logging.ILogger * Microsoft.Extensions.Http.HttpClientFactoryOptions -> Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler
Public Sub New (logger As ILogger, options As HttpClientFactoryOptions)
參數
- options
- HttpClientFactoryOptions
用來設定 LoggingScopeHttpMessageHandler 實例的 HttpClientFactoryOptions。
例外狀況
logger
或 options
null
。