MemberRelationshipService.SetRelationship 方法

定义

在源对象和目标关系之间创建关系。

protected:
 virtual void SetRelationship(System::ComponentModel::Design::Serialization::MemberRelationship source, System::ComponentModel::Design::Serialization::MemberRelationship relationship);
protected virtual void SetRelationship (System.ComponentModel.Design.Serialization.MemberRelationship source, System.ComponentModel.Design.Serialization.MemberRelationship relationship);
abstract member SetRelationship : System.ComponentModel.Design.Serialization.MemberRelationship * System.ComponentModel.Design.Serialization.MemberRelationship -> unit
override this.SetRelationship : System.ComponentModel.Design.Serialization.MemberRelationship * System.ComponentModel.Design.Serialization.MemberRelationship -> unit
Protected Overridable Sub SetRelationship (source As MemberRelationship, relationship As MemberRelationship)

参数

source
MemberRelationship

源关系。

relationship
MemberRelationship

要设置到源中的关系。

例外

服务不支持该关系。

注解

如果关系参数为 Empty,则SetRelationship方法清除任何现有关系。 默认实现使用弱引用将关系存储在字典中,因此关系表不会使对象保持活动状态。

适用于