Open sandboxFocus

Interface IAspectClass

Represents the metadata and characteristics of an aspect class type, providing information about how the aspect is displayed, whether it's inheritable, and other type-level properties.

Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[InternalImplement]
[CompileTime]
public interface IAspectClass
Remarks

IAspectClass exposes compile-time metadata about an aspect type that can be queried from:

  • AspectClass - Get the class of a specific aspect instance
  • Introspection APIs - Query aspect metadata for analysis or tooling

This interface provides access to both runtime type information (via Type) and Metalama-specific metadata such as display names, inheritance settings, and editor experience configuration.

Properties

Name Description
Description

Gets the optional long description of the aspect. This property can be set by adding the DescriptionAttribute custom attribute to the aspect class. By default, it is null.

DisplayName

Gets the name of the aspect displayed to the design-time UI. This property should not be used to report diagnostics (ShortName should be used instead). It can be set by adding the DisplayNameAttribute custom attribute to the aspect class. By default, it is equal to ShortName.

EditorExperienceOptions

Gets the editor experience options for the aspect, which control how the aspect is suggested in the IDE's code refactoring menu. These options can be configured using the EditorExperienceAttribute custom attribute on the aspect class.

FullName

Gets the fully qualified type of the aspect.

IsAbstract

Gets a value indicating whether the aspect class is an abstract class.

IsAttribute

Gets a value indicating whether the aspect class derives from Attribute.

IsInheritable

Gets a value indicating whether instances of this aspect class are inherited by derived declarations. This property returns null when the aspect class implements the IConditionallyInheritableAspect, because each aspect instance can decide whether it is inheritable or not. This property returns true when the aspect class is annotated with the InheritableAttribute custom attribute.

ShortName

Gets the name of the aspect type without the namespace and without the Attribute suffix.

Type

Gets the type of the aspect.

Extension Methods

See Also