Share via


KeyedSingletonService<TKey,TService> 類別

定義

表示金鑰所識別的單一服務。

public class KeyedSingletonService<TKey,TService> : IEquatable<TKey>, Orleans.Runtime.IKeyedService<TKey,TService> where TService : class
type KeyedSingletonService<'Key, 'Service (requires 'Service : null)> = class
    interface IKeyedService<'Key, 'Service (requires 'Service : null)>
    interface IEquatable<'Key>
Public Class KeyedSingletonService(Of TKey, TService)
Implements IEquatable(Of TKey), IKeyedService(Of TKey, TService)

類型參數

TKey

索引鍵的類型。

TService

服務的類型。

繼承
KeyedSingletonService<TKey,TService>
衍生
實作

建構函式

KeyedSingletonService<TKey,TService>(TKey, IServiceProvider, Func<IServiceProvider,TKey,TService>)

初始化 KeyedSingletonService<TKey,TService> 類別的新執行個體。

屬性

Key

取得服務金鑰。

方法

Equals(TKey)

表示金鑰所識別的單一服務。

GetService(IServiceProvider)

從服務提供者取得服務。

適用於