Open sandboxFocus

Class EditorExperienceOptions

Represents the compile-time options controlling how an aspect is suggested in the IDE's code refactoring menu.

Inheritance
EditorExperienceOptions
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed record EditorExperienceOptions : IEquatable<EditorExperienceOptions>
Remarks

This record contains the resolved options that control IDE integration for aspects. While aspect authors typically use EditorExperienceAttribute to configure these options declaratively, this record represents the effective options that can be queried via EditorExperienceOptions.

The options support two modes of aspect application in the IDE:

  • Live Template: Applies the aspect by transforming the source code directly.
  • Add Attribute: Applies the aspect by adding a custom attribute to the declaration.

Constructors

Name Description
EditorExperienceOptions(bool?, string?, bool?, string?)

Represents the compile-time options controlling how an aspect is suggested in the IDE's code refactoring menu.

Properties

Name Description
AddAttributeSuggestionTitle

The title for the "Add attribute" menu item. Use the vertical pipe (|) to create nested sub-menus. For example, "Logging|Add Audit Logging" creates a "Logging" submenu.

Default
LiveTemplateSuggestionTitle

The title for the live template menu item. Use the vertical pipe (|) to create nested sub-menus.

SuggestAsAddAttribute

Whether the aspect should be suggested as an "add attribute" code action. When true, the IDE will offer to apply the aspect by adding it as a custom attribute to the target declaration.

SuggestAsLiveTemplate

Whether the aspect should be suggested as a live template code action. When true, the IDE will offer to apply the aspect directly to the source code, transforming it in place.

Methods

Name Description
Deconstruct(out bool?, out string?, out bool?, out string?)
Equals(EditorExperienceOptions?)
Equals(object?)
GetHashCode()
ToString()

Operators

Name Description
operator ==(EditorExperienceOptions?, EditorExperienceOptions?)
operator !=(EditorExperienceOptions?, EditorExperienceOptions?)

Extension Methods

See Also