Open sandboxFocus

Class CommandOptionsBuilder

Builder for configuring the CommandAttribute aspect, allowing customization of naming conventions and INotifyPropertyChanged integration.

Inheritance
CommandOptionsBuilder
Namespace: Metalama.Patterns.Wpf.Configuration
Assembly: Metalama.Patterns.Wpf.dll
Syntax
[CompileTime]
public sealed class CommandOptionsBuilder
Remarks

Use this builder through the CommandExtensions.ConfigureCommand(IQuery<ICompilation>,Action<CommandOptionsBuilder>) method and its overloads to configure command options at the project, namespace, type, or method level.

Constructors

Name Description
CommandOptionsBuilder()

Properties

Name Description
DefaultNamingConventionName

Gets the key of the default naming convention.

EnableINotifyPropertyChangedIntegration

Gets or sets a value indicating whether integration with INotifyPropertyChanged is enabled. The default is true.

Methods

Name Description
AddNamingConvention(CommandNamingConvention, int?)

Adds or updates a naming convention that specifies, based on the name of the target method of the CommandAttribute aspect: the name of the command property and the name of the CanExecute method or property.

RemoveNamingConvention(string)

Removes a CommandNamingConvention.

ResetNamingConventions()

Resets naming convention registrations to the default state, removing any user-registered naming conventions.

SetNamingConventionPriority(string, int)

Changes the priority of a CommandNamingConvention.

Extension Methods

See Also