共用方式為


OptionConfigureExtensionMethods.ConfigureNamedOptionForLogging<TOptions> 方法

定義

設定要記錄的具名選項。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureNamedOptionForLogging<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TOptions : class;
static member ConfigureNamedOptionForLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function ConfigureNamedOptionForLogging(Of TOptions As Class) (services As IServiceCollection, name As String) As IServiceCollection

類型參數

TOptions

選項物件的類型。

參數

services
IServiceCollection

服務。

name
String

選項物件的名稱。

傳回

IServiceCollection 用於與其他呼叫鏈結。

適用於