NestedContainer.GetService(Type) 方法

定義

取得指定型別的服務物件 (如果有的話)。

protected:
 override System::Object ^ GetService(Type ^ service);
protected override object GetService (Type service);
protected override object? GetService (Type service);
override this.GetService : Type -> obj
Protected Overrides Function GetService (service As Type) As Object

參數

service
Type

要擷取之服務的 Type

傳回

實作所要求之服務的 Object,或 null (如果無法解析服務)。

備註

這個方法會 Container.GetService 覆寫 方法。 此實作只會解析 和 IContainer 服務的要求INestedContainer

適用於

另請參閱