Core Interfaces
IMetadataModel
Base interface for all metadata model elements.Unique identifier for the metadata element
Display name of the element
Optional comment/description text
IElement
Represents a metadata element with full hierarchy support.Unique identifier for the element
Element name
The specialization type name (e.g., “Class”, “Operation”, “Attribute”)
Unique identifier for the specialization type
Child elements in the hierarchy
Applied stereotypes
Parent package containing this element
IElementWrapper
Wrapper interface for accessing the underlying IElement.Access to the underlying IElement instance
IElementWrapper.cs
Extension Methods
ElementExtensions
Utility methods for querying and filtering metadata elements.Usage Examples
Querying Elements by Type
Custom Element Filtering
Accessing Element Properties
Trait Interfaces
IInvokableModel
Marker interface indicating an element can be invoked from a Processing Handler (e.g., Commands, Queries, Operations on Services).IAllowCommentModel
Indicates the element supports comment/documentation text.IProcessingHandlerModel
Represents a processing handler element that can invoke operations.Best Practices
Use Type-Safe Wrappers
Create strongly-typed model classes that implement
IElementWrapper rather than working directly with IElementCache Element Queries
Cache results from
GetElementsOfType when you need to access them multiple timesValidate Element Types
Always verify an element’s
SpecializationTypeId matches your expectations before castingHandle Null References
Check for null when accessing
Package or parent elements as they may not always be presentSee Also
- Stereotypes API - Working with stereotypes on metadata models
- Designer API - Accessing designers and metadata managers