共用方式為


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

要設定至 source 的關聯性。

例外狀況

服務不支援關聯性。

備註

如果關聯性參數為 Empty,此方法SetRelationship會清除任何現有的關聯性。 默認實作會使用弱式參考將關聯性儲存在字典中,讓關聯性數據表不會讓物件保持運作。

適用於