IContentTypeRegistryService 接口

对内容类型的集合进行维护的服务。

命名空间:  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;

请参阅

参考

Microsoft.VisualStudio.Utilities 命名空间