PresentationViewsSubject.GetPresentation 메서드

지정 된 도메인 모델 요소를 표시 하는 Presentationelements를 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.Modeling.Diagrams
어셈블리:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0(Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.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에 대 한 경우를 제외 하 고, 각 도메인 영역에 대 한 프레젠테이션 요소 하나 표시 됩니다.경우에 따라 디스플레이 초기화 하는 동안 수 표시 요소가 있습니다.사용자 도메인 클래스에 대 한 도메인 요소 매핑 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 네임스페이스