定义内容类型。
继承层次结构
Object
Microsoft.VisualStudio.Utilities.ContentTypeDefinition
命名空间: Microsoft.VisualStudio.Utilities
程序集: Microsoft.VisualStudio.CoreUtility(在 Microsoft.VisualStudio.CoreUtility.dll 中)
语法
声明
Public NotInheritable Class ContentTypeDefinition
public sealed class ContentTypeDefinition
public ref class ContentTypeDefinition sealed
[<Sealed>]
type ContentTypeDefinition = class end
public final class ContentTypeDefinition
ContentTypeDefinition 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
![]() |
ContentTypeDefinition | 初始化 ContentTypeDefinition 的新实例。 |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
Equals | 确定指定的对象是否等于当前对象。 (继承自 Object。) |
![]() |
GetHashCode | 作为默认哈希函数。 (继承自 Object。) |
![]() |
GetType | 获取当前实例的 Type。 (继承自 Object。) |
![]() |
ToString | 返回表示当前对象的字符串。 (继承自 Object。) |
页首
备注
由于无法子类此类型,可以使用导出 [] 特性没有类型。
示例
internal sealed class Components
{
[Export]
[Name("Example")] // required
[BaseDefinition("text")] // zero or more BaseDefinitions are allowed
internal ContentTypeDefinition exampleDefinition;
{ other components }
}
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。