对内容类型的集合进行维护的服务。
命名空间: Microsoft.VisualStudio.Utilities
程序集: Microsoft.VisualStudio.CoreUtility(在 Microsoft.VisualStudio.CoreUtility.dll 中)
语法
声明
Public Interface IContentTypeRegistryService
public interface IContentTypeRegistryService
public interface class IContentTypeRegistryService
type IContentTypeRegistryService = interface end
public interface IContentTypeRegistryService
IContentTypeRegistryService 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
![]() |
ContentTypes | 获取所有内容类型(包括“未知”内容类型)的枚举。 |
![]() |
UnknownContentType | 获取“未知”内容类型。 |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
AddContentType | 创建并添加新的内容类型。 |
![]() |
GetContentType | 获取具有指定的类型名称的 IContentType 对象。 |
![]() |
RemoveContentType | 移除内容类型。 |
页首
备注
这是 MEF 组件部件,应导入如下所示:
[Import]
Internal IContentTypeRegistryService registryservice = null;