Diagram.GetService 方法
获取服务。
命名空间: Microsoft.VisualStudio.Modeling.Diagrams
程序集: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。