对文件扩展名与内容类型之间的关联进行管理的服务。
命名空间: Microsoft.VisualStudio.Utilities
程序集: Microsoft.VisualStudio.CoreUtility(在 Microsoft.VisualStudio.CoreUtility.dll 中)
语法
声明
Public Interface IFileExtensionRegistryService
public interface IFileExtensionRegistryService
public interface class IFileExtensionRegistryService
type IFileExtensionRegistryService = interface end
public interface IFileExtensionRegistryService
IFileExtensionRegistryService 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
AddFileExtension | 向注册表添加新的文件扩展名。 |
![]() |
GetContentTypeForExtension | 获取与给定文件扩展名关联的内容类型。 |
![]() |
GetExtensionsForContentType | 获取与指定内容类型关联的文件扩展名的列表。 |
![]() |
RemoveFileExtension | 从注册表移除指定的文件扩展名。 |
页首
备注
这是 MEF 组件部件,应导入如下所示:
[Import]
internal IFileExtensionRegistryService registryService = null;