MemberRelationshipServiceとは? わかりやすく解説

MemberRelationshipService クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

1 つメンバ別のメンバ関連付けるための基本クラス提供します

名前空間: System.ComponentModel.Design.Serialization
アセンブリ: System (system.dll 内)
構文構文

Public MustInherit Class
 MemberRelationshipService
Dim instance As MemberRelationshipService
public abstract class MemberRelationshipService
public ref class MemberRelationshipService
 abstract
public abstract class MemberRelationshipService
public abstract class MemberRelationshipService
解説解説

デザイナは、オブジェクトライブ プロパティ値を検索し、これらの値をコードとして生成するエンジン使用してデザイナ自体コードシリアル化ます。そのため、たとえば、ボタンテキスト次の書式生成されます。

this.okButton.Text = "OK";

このスキーム制限1 つに、別の場所からプロパティ取得するのが難しいという点があります。たとえば、次の形式コード出力するのは非常に困難です。これは、コード ジェネレータプロパティの値にのみ依存しているためです。

this.titleLabel.Text = this.Text;
メモメモ

The HostProtectionAttribute attribute applied to this class has the following Resources property value: SharedState.The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser).詳細については、HostProtectionAttribute クラストピック参照してください

継承時の注意 MemberRelationshipService クラスabstract です。具体的なバージョン実装は、サポートされているメンバの型によって異なります。たとえば、1 つイベント別のイベント関連付けるには、1 つプロパティ別のプロパティ関連付けるのとは別の実装必要になる場合ありますサービス実装するには、次の手順実行する必要があります

使用例使用例

MemberRelationshipService は、別の場所からのプロパティ値の取得簡略化ます。デザイナは、このサービスアクセスして、1 つメンバ別のメンバの値を割り当てるように指定できますコード ジェネレータは、コード生成時にこのようなリレーションシップ検索します2 つメンバ間のリレーションシップ見つかった場合は、プロパティ値を検索するではなく、このリレーションシップコード出力します。前のテキスト割り当てを例として使用してリレーションシップ確立使用するデザイン時のコード次のコード例示します

object titleLabel, form;
PropertyDescriptor titleLabelText = TypeDescriptor.GetProperties(titleLabel)[“Text”];
PropertyDescriptor formText = TypeDescriptor.GetProperties(form)[“Text”];
MemberRelationshipService ms = GetService(typeof(MemberRelationshipService);
ms[titleLabel, titleLabelText] = new MemberRelationship(form,
 formText);
継承階層継承階層
System.Object
  System.ComponentModel.Design.Serialization.MemberRelationshipService
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
MemberRelationshipService メンバ
System.ComponentModel.Design.Serialization 名前空間
TypeDescriptor クラス
IDesignerSerializationManager インターフェイス

MemberRelationshipService コンストラクタ


MemberRelationshipService プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

MemberRelationshipService クラス
System.ComponentModel.Design.Serialization 名前空間
TypeDescriptor クラス
IDesignerSerializationManager インターフェイス

MemberRelationshipService メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

MemberRelationshipService クラス
System.ComponentModel.Design.Serialization 名前空間
TypeDescriptor クラス
IDesignerSerializationManager インターフェイス

MemberRelationshipService メンバ

1 つメンバ別のメンバ関連付けるための基本クラス提供します

MemberRelationshipService データ型公開されるメンバを以下の表に示します


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド MemberRelationshipService MemberRelationshipService クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

MemberRelationshipService クラス
System.ComponentModel.Design.Serialization 名前空間
TypeDescriptor クラス
IDesignerSerializationManager インターフェイス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「MemberRelationshipService」の関連用語

MemberRelationshipServiceのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



MemberRelationshipServiceのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS