次の方法で共有


PresentationViewsSubject.GetPresentation メソッド

特定のドメイン モデル要素を表示する PresentationElements を取得します。

名前空間:  Microsoft.VisualStudio.Modeling.Diagrams
アセンブリ:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll 内)

構文

'宣言
Public Shared Function GetPresentation ( _
    element As ModelElement _
) As LinkedElementCollection(Of PresentationElement)
public static LinkedElementCollection<PresentationElement> GetPresentation(
    ModelElement element
)

パラメーター

戻り値

型 : Microsoft.VisualStudio.Modeling.LinkedElementCollection<PresentationElement>

解説

ドメイン モデル要素または関係からユーザー インターフェイスの操作を表す図形に移動するか、リンクには、このメソッドを使用します。 DSL に主要なカスタマイズを除き、各ドメインの要素の 1 回のプレゼンテーションの要素があります。 場合によっては、表示が初期化が、表示要素がある場合があります。 、DSL 定義のドメイン クラスのドメインの要素のマッピングを設定しなかった場合、要素はありません。

ドメインの要素の特定のクラスの場合は、ドメイン内の要素のマッピングは、プレゼンテーションの要素–クラスの図形またはリンクを指定します。

ExampleElement element = ...;
ExampleShape shape = PresentationViewsSubject.GetPresentation(element).FirstOrDefault() as ExampleShape;
if (shape != null) {...}

// A domain relationship:
ExampleElementReferencesTargets relationship = ...; 
// In the DSL Definition, this relationship is mapped to the following BinaryLinkShape:
ExampleConnector link = PresentationViewsSubject.GetPresentation(relationship).FirstOrDefault() as ExampleConnector;
if (link != null) {...}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

PresentationViewsSubject クラス

Microsoft.VisualStudio.Modeling.Diagrams 名前空間