다음을 통해 공유


IContentTypeRegistryService.AddContentType 메서드

새 콘텐츠 형식을 만들고 추가합니다.

네임스페이스:  Microsoft.VisualStudio.Utilities
어셈블리:  Microsoft.VisualStudio.CoreUtility(Microsoft.VisualStudio.CoreUtility.dll)

구문

‘선언
Function AddContentType ( _
    typeName As String, _
    baseTypeNames As IEnumerable(Of String) _
) As IContentType
IContentType AddContentType(
    string typeName,
    IEnumerable<string> baseTypeNames
)
IContentType^ AddContentType(
    String^ typeName, 
    IEnumerable<String^>^ baseTypeNames
)
abstract AddContentType : 
        typeName:string * 
        baseTypeNames:IEnumerable<string> -> IContentType
function AddContentType(
    typeName : String, 
    baseTypeNames : IEnumerable<String>
) : IContentType

매개 변수

  • typeName
    형식: String

    콘텐츠 형식의 이름입니다.

  • baseTypeNames
    형식: IEnumerable<String>

    기본 콘텐츠 형식으로 사용할 콘텐츠 형식 이름 목록입니다. 선택적 요소.

반환 값

형식: Microsoft.VisualStudio.Utilities.IContentType
IContentType 입니다.

예외

예외 조건
InvalidOperationException

typeName나는 baseTypeNames 이름이 UnknownContentType, 콘텐츠 형식을 이미 또는 기본 형식 중 하나에 순환 기본 형식 관계 소개 것.

ArgumentException

typeName이 nullNull 참조(Visual Basic의 경우 Nothing)이거나 비어 있는 경우

.NET Framework 보안

참고 항목

참조

IContentTypeRegistryService 인터페이스

Microsoft.VisualStudio.Utilities 네임스페이스