GraphObject.GetValue<T> 方法 (GraphProperty, Graph, GraphCategory%)
获取指定的属性的值,并返回类别此属性值继承了,因此,如果有的话)。
命名空间: Microsoft.VisualStudio.GraphModel
程序集: Microsoft.VisualStudio.GraphModel(在 Microsoft.VisualStudio.GraphModel.dll 中)
语法
声明
Public Function GetValue(Of T) ( _
property As GraphProperty, _
owner As Graph, _
<OutAttribute> ByRef category As GraphCategory _
) As T
public T GetValue<T>(
GraphProperty property,
Graph owner,
out GraphCategory category
)
public:
generic<typename T>
T GetValue(
GraphProperty^ property,
Graph^ owner,
[OutAttribute] GraphCategory^% category
)
member GetValue :
property:GraphProperty *
owner:Graph *
category:GraphCategory byref -> 'T
JScript 不支持泛型类型或方法。
类型参数
- T
返回的数据类型。
参数
property
类型:Microsoft.VisualStudio.GraphModel.GraphProperty属性要获取值。
owner
类型:Microsoft.VisualStudio.GraphModel.Graph检索有关此对象的附加元数据关系图 (或 GraphSchema)。
category
类型:Microsoft.VisualStudio.GraphModel.GraphCategory%类别属性值继承了 null,则它未被继承。
返回值
类型:T
给定属性的值。
异常
异常 | 条件 |
---|---|
ArgumentNullException | 引发,如果键为空。 |
InvalidOperationException | 引发,如果属性类型不匹配给定泛型类型。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。