Share via


MetadataStore 클래스

정의

Type별로 디자이너 요소를 신속하게 조회할 수 있도록 하는 해시 테이블의 메모리 내 컬렉션입니다.

public ref class MetadataStore abstract sealed
public static class MetadataStore
type MetadataStore = class
Public Class MetadataStore
상속
MetadataStore

예제

다음 코드 예제에서는 사용자 지정 활동 디자이너를 ActivityDesigner1 사용자 지정 활동과 연결하는 방법을 보여 줍니다. 사용자 지정 활동 디자이너를 만드는 방법에 대한 자세한 내용은 방법: 사용자 지정 활동 디자이너 만들기를 참조하세요.

internal class Metadata : IRegisterMetadata  
{  
    private AttributeTable attributes;  

    // Called by the designer to register any design-time metadata.  
    public void Register()  
    {  
        AttributeTableBuilder builder = new AttributeTableBuilder();  

        // Add the custom attributes to associate the ActivityDesigner1 custom designer  
        // with the custom activity MyActivity.  
        builder.AddCustomAttributes(  
            typeof(MyActivity),  
            new DesignerAttribute(typeof(ActivityDesigner1)));  
        MetadataStore.AddAttributeTable(builder.CreateTable());  

    }  
}  

설명

메타데이터 저장소에는 디자이너와 형식 간의 연결과 같은 사용자 지정 특성 메타데이터가 포함되어 있습니다. 사용자 지정 특성은 에서 AttributeTable 정의하고 메타데이터 저장소에 추가할 수 있습니다. 특성이 추가되면 에 대한 호출 TypeDescriptor에 표시됩니다.

메서드

AddAttributeTable(AttributeTable)

지정된 테이블을 현재 AppDomain 개체의 특성 저장소에 추가합니다.

적용 대상