다음을 통해 공유


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은 주요 사용자 지정 내용을 하지 않으면 각 도메인 요소에 대 한 프레젠테이션 요소 있을 것입니다. 경우에 따라서는 표시 초기화 하는 동안, 수 표시 요소가 있습니다. 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 네임스페이스