共用方式為


DirectorySiloBuilderExtensions.AddGrainDirectory 方法

定義

多載

AddGrainDirectory<T>(IServiceCollection, String, Func<IServiceProvider,String,T>)

將粒紋目錄提供者實作新增至尋址接收器。 如果提供者類型實作 ILifecycleParticipant<TLifecycleObservable> ,它會自動參與尋址接收器生命週期。

AddGrainDirectory<T>(ISiloBuilder, String, Func<IServiceProvider,String,T>)

將粒紋目錄提供者實作新增至尋址接收器。 如果提供者類型實作 ILifecycleParticipant<TLifecycleObservable> ,它會自動參與尋址接收器生命週期。

AddGrainDirectory<T>(IServiceCollection, String, Func<IServiceProvider,String,T>)

將粒紋目錄提供者實作新增至尋址接收器。 如果提供者類型實作 ILifecycleParticipant<TLifecycleObservable> ,它會自動參與尋址接收器生命週期。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddGrainDirectory<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name, Func<IServiceProvider,string,T> implementationFactory) where T : Orleans.GrainDirectory.IGrainDirectory;
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddGrainDirectory<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name, Func<IServiceProvider,string,T> implementationFactory) where T : class, Orleans.GrainDirectory.IGrainDirectory;
static member AddGrainDirectory : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<IServiceProvider, string, 'T (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)
static member AddGrainDirectory : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<IServiceProvider, string, 'T (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)
<Extension()>
Public Function AddGrainDirectory(Of T As IGrainDirectory) (collection As IServiceCollection, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As IServiceCollection
<Extension()>
Public Function AddGrainDirectory(Of T As {Class, IGrainDirectory}) (collection As IServiceCollection, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As IServiceCollection

類型參數

T

粒紋目錄提供者的具體實作類型。

參數

collection
IServiceCollection

服務集合。

name
String

要加入的粒紋目錄名稱。

implementationFactory
Func<IServiceProvider,String,T>

建置粒紋目錄提供者的 Factory。

傳回

服務集合。

適用於

AddGrainDirectory<T>(ISiloBuilder, String, Func<IServiceProvider,String,T>)

將粒紋目錄提供者實作新增至尋址接收器。 如果提供者類型實作 ILifecycleParticipant<TLifecycleObservable> ,它會自動參與尋址接收器生命週期。

public static Orleans.Hosting.ISiloBuilder AddGrainDirectory<T> (this Orleans.Hosting.ISiloBuilder builder, string name, Func<IServiceProvider,string,T> implementationFactory) where T : Orleans.GrainDirectory.IGrainDirectory;
public static Orleans.Hosting.ISiloBuilder AddGrainDirectory<T> (this Orleans.Hosting.ISiloBuilder builder, string name, Func<IServiceProvider,string,T> implementationFactory) where T : class, Orleans.GrainDirectory.IGrainDirectory;
static member AddGrainDirectory : Orleans.Hosting.ISiloBuilder * string * Func<IServiceProvider, string, 'T (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Orleans.Hosting.ISiloBuilder (requires 'T :> Orleans.GrainDirectory.IGrainDirectory)
static member AddGrainDirectory : Orleans.Hosting.ISiloBuilder * string * Func<IServiceProvider, string, 'T (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)> -> Orleans.Hosting.ISiloBuilder (requires 'T : null and 'T :> Orleans.GrainDirectory.IGrainDirectory)
<Extension()>
Public Function AddGrainDirectory(Of T As IGrainDirectory) (builder As ISiloBuilder, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As ISiloBuilder
<Extension()>
Public Function AddGrainDirectory(Of T As {Class, IGrainDirectory}) (builder As ISiloBuilder, name As String, implementationFactory As Func(Of IServiceProvider, String, T)) As ISiloBuilder

類型參數

T

粒紋目錄提供者的具體實作類型。

參數

builder
ISiloBuilder

尋址接收器產生器。

name
String

要加入的粒紋目錄名稱。

implementationFactory
Func<IServiceProvider,String,T>

建置粒紋目錄提供者的 Factory。

傳回

尋址接收器產生器。

適用於