MefInjection<TService,TInterface>.GetServiceAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
以異步方式傳回擷取的服務。
public System.Threading.Tasks.Task<TInterface> GetServiceAsync();
member this.GetServiceAsync : unit -> System.Threading.Tasks.Task<'Interface>
Public Function GetServiceAsync () As Task(Of TInterface)
傳回
Task<TInterface>
服務的實例 TService 。
備註
這個方法的多個呼叫會傳回相同的 實例 TInterface。