IContentTypeRegistryService.AddContentType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建并添加新的内容类型。
public:
Microsoft::VisualStudio::Utilities::IContentType ^ AddContentType(System::String ^ typeName, System::Collections::Generic::IEnumerable<System::String ^> ^ baseTypeNames);
public Microsoft.VisualStudio.Utilities.IContentType AddContentType (string typeName, System.Collections.Generic.IEnumerable<string> baseTypeNames);
abstract member AddContentType : string * seq<string> -> Microsoft.VisualStudio.Utilities.IContentType
Public Function AddContentType (typeName As String, baseTypeNames As IEnumerable(Of String)) As IContentType
参数
- typeName
- String
内容类型的名称。
- baseTypeNames
- IEnumerable<String>
要用作基内容类型的内容类型名称的列表。 可选。
返回
例外
typeName 为 null 或为空。
typeName 或者其中一个 baseTypeNames 是的名称 UnknownContentType ,或者内容类型已经存在,或者其中一个基类型会引入循环基类型关系。