Diagram.GetService 方法

取得服務。

命名空間:  Microsoft.VisualStudio.Modeling.Diagrams
組件:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll 中)

語法

'宣告
Public Function GetService ( _
    serviceType As Type _
) As Object
public Object GetService(
    Type serviceType
)

參數

  • serviceType
    型別:System.Type
    要擷取的服務型別。

傳回值

型別:System.Object
服務; 如果找不到任何服務, nullnull 參考 (即 Visual Basic 中的 Nothing)。

備註

若要取得的服務,這個方法會查詢在存放區。如果存放區中找不到任何服務,且圖表有使用中圖表] 檢視,會查詢使用中圖表] 檢視。

.NET Framework 安全性

請參閱

參考

Diagram 類別

Microsoft.VisualStudio.Modeling.Diagrams 命名空間