IModelElement.GetRelationship<TFrom, TTo> 方法 (ModelRelationshipClass)

返回一个关系,其中两个相关元素属于指定类型。

命名空间:  Microsoft.Data.Schema.SchemaModel
程序集:  Microsoft.Data.Schema(在 Microsoft.Data.Schema.dll 中)

语法

声明
Function GetRelationship(Of TFrom As {Class, IModelElement}, TTo As {Class, IModelElement}) ( _
    relationshipClass As ModelRelationshipClass _
) As IModelRelationship(Of TFrom, TTo)
IModelRelationship<TFrom, TTo> GetRelationship<TFrom, TTo>(
    ModelRelationshipClass relationshipClass
)
where TFrom : class, IModelElement
where TTo : class, IModelElement
generic<typename TFrom, typename TTo>
where TFrom : ref class, IModelElement
where TTo : ref class, IModelElement
IModelRelationship<TFrom, TTo>^ GetRelationship(
    ModelRelationshipClass^ relationshipClass
)
abstract GetRelationship : 
        relationshipClass:ModelRelationshipClass -> IModelRelationship<'TFrom, 'TTo>  when 'TFrom : not struct and IModelElement when 'TTo : not struct and IModelElement
JScript 不支持泛型类型或方法。

类型参数

  • TFrom
    相关(即左侧)元素的 Type
  • TTo
    相关(即右侧)元素的 Type

参数

返回值

类型:Microsoft.Data.Schema.SchemaModel.IModelRelationship<TFrom, TTo>
一个 IModelRelationship<TFrom, TTo> 对象。

.NET Framework 安全性

请参见

参考

IModelElement 接口

GetRelationship 重载

Microsoft.Data.Schema.SchemaModel 命名空间

ModelRelationshipClass

IModelRelationship<TFrom, TTo>