ElementTypeDescriptor Class
Provides additional run-time type information for a ModelElement object.
Inheritance Hierarchy
System.Object
System.ComponentModel.CustomTypeDescriptor
Microsoft.VisualStudio.Modeling.Design.ElementTypeDescriptor
Microsoft.VisualStudio.Modeling.Diagrams.PresentationElementTypeDescriptor
Microsoft.VisualStudio.Modeling.DslDefinition.ConnectorHasDecoratorsTypeDescriptor
Microsoft.VisualStudio.Modeling.DslDefinition.Design.DslDefinitionModelElementTypeDescriptor
Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerBehaviorTypeDescriptor
Microsoft.VisualStudio.Modeling.DslDefinition.ShapeHasDecoratorsTypeDescriptor
Microsoft.VisualStudio.Modeling.DslDefinition.XmlSerializationBehaviorTypeDescriptor
Namespace: Microsoft.VisualStudio.Modeling.Design
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'宣告
Public Class ElementTypeDescriptor _
Inherits CustomTypeDescriptor
public class ElementTypeDescriptor : CustomTypeDescriptor
public ref class ElementTypeDescriptor : public CustomTypeDescriptor
type ElementTypeDescriptor =
class
inherit CustomTypeDescriptor
end
public class ElementTypeDescriptor extends CustomTypeDescriptor
The ElementTypeDescriptor type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ElementTypeDescriptor(Type) | ctor for creating the wrapper class which represents the MEL type to be consumed | |
ElementTypeDescriptor(ModelElement) | Initializes a new instance of the ElementTypeDescriptor class. | |
ElementTypeDescriptor(ICustomTypeDescriptor, ModelElement) | Initializes a new instance of the ElementTypeDescriptor class by using a parent custom type descriptor. | |
ElementTypeDescriptor(ICustomTypeDescriptor, Type) | ctor for creating the wrapper class which represents the MEL type to be consumed |
Top
Properties
Name | Description | |
---|---|---|
ComponentType | Gets the Type of the model element that this class is representing. | |
ModelElement | Gets the model element that this class is representing. | |
Store |
Top
Methods
Name | Description | |
---|---|---|
CollectionRolePropertiesBrowsable | For all the relationships this model element participate, return whether any PropertyDescriptor for Collection properties based on roles is Browsable | |
CreateCollectionPropertyDescriptor | ||
CreatePropertyDescriptor | Creates a descriptor for a property of a model element. | |
CreateRolePlayerPropertyDescriptor | Creates a descriptor for a role property of a model element. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAttributes | Returns a collection of custom attributes for the type represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetCategory | Returns a localized string for the category of a domain property. | |
GetClassName | Returns the name of the class this descriptor represents. (Overrides CustomTypeDescriptor.GetClassName().) | |
GetComponentName | Gets the name of the model element that is represented by this class. (Overrides CustomTypeDescriptor.GetComponentName().) | |
GetConverter | Returns a type converter for the type represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetDefaultEvent | Returns the event descriptor for the default event of the object represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetDefaultProperty | Returns the property descriptor for the default property of the object represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetDescription | Returns a localized string for the description of a domain property. | |
GetDisplayProperties(ModelElement, PropertyDescriptor%) | Returns a collection of property descriptors for all the properties of a model element. | |
GetDisplayProperties(ModelElement, Store, PropertyDescriptor%) | Returns a list of property descriptors corresponding to each domain property | |
GetDomainClassInfo | Return the domain class info for the type of element being described. | |
GetDomainPropertyAttributes | Returns an array of the custom attributes that are applied to the described property. | |
GetEditor | Returns an editor of the specified type that is to be associated with the class represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetEvents() | Returns a collection of event descriptors for the object represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetEvents(array<Attribute[]) | Returns a filtered collection of event descriptors for the object represented by this type descriptor. (Inherited from CustomTypeDescriptor.) | |
GetExtensionProperties | Returns the property descriptors for any extension elements | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetProperties() | Returns a collection of domain property descriptors that contains all the properties of the described type. (Overrides CustomTypeDescriptor.GetProperties().) | |
GetProperties(array<Attribute[]) | Returns a collection of domain property descriptors that contains all the properties of the described type, filtered by the specified attributes. (Overrides CustomTypeDescriptor.GetProperties(array<Attribute[]).) | |
GetPropertyDescriptorDisplayName | Returns a localized string for the display name of a domain property. | |
GetPropertyOwner | Returns an object that contains the property described by the specified property descriptor. (Inherited from CustomTypeDescriptor.) | |
GetRolePlayerPropertyAttributes | Returns an array of the custom attributes that are applied to the described role property. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IncludeCollectionRoleProperties | For all the relationships this model element participate, return whether to provide a PropertyDescriptor for Collection properties based on roles. | |
IncludeEmbeddingRelationshipProperties | For the specified model element, returns a value that indicates whether to add properties of the target element of any embedded relationships that do not allow duplicates. | |
IncludeOppositeRolePlayerProperties | For the specified model element, returns a value that indicates whether to add role properties for zero-to-one and one-to-one relationships. | |
IsPropertyDescriptorReadOnly | Returns a value that indicates whether the described property is read-only. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ShouldCreateCollectionPropertyDescriptor | For the relationship and the instance level role players involved, return whether to create a property descriptor for the collections | |
ShouldCreatePropertyDescriptor | Returns a value that indicates whether a descriptor should be created for the specified domain property. | |
ShouldCreateRolePlayerPropertyDescriptor | Returns a value that indicates whether a descriptor should be created for the specified role property. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
This class provides dynamic custom type information for model elements.
The Domain-Specific Language Tools (DSL Tools) use this type to represent the model elements in a domain model. This type controls how an element is handled by the property grid in the domain model and provides methods for working with the described element.
To create a customized element type descriptor, inherit from this class and override one or more of the members.
注意
If your DSL definition specifies a domain type descriptor for a domain class, then the generated code for the definition will contain a type descriptor, derived from ElementTypeDescriptor, specifically for that domain class. For more information, see Displaying Properties of Related Elements - redirection.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.Modeling.Design Namespace