Open sandboxFocus

Class CommandNamingConvention

Inheritance
CommandNamingConvention
Namespace: Metalama.Patterns.Wpf.Configuration
Assembly: Metalama.Patterns.Wpf.dll
Syntax
[CompileTime]
public sealed record CommandNamingConvention : ICompileTimeSerializable, IEquatable<CommandNamingConvention>

Constructors

Name Description
CommandNamingConvention(string)

Properties

Name Description
CanExecutePatterns

Gets or sets a list of regular expression patterns that will be evaluated against method and/or property names to identify candidate can-execute members. In this pattern, all occurrences of the substring {CommandName} will be replaced with the command name determined according to CommandNamePattern before the expression is evaluated.

CommandNamePattern

Gets or sets a regular expression pattern that will be evaluated against the name of the target method of the CommandAttribute aspect. The expression should yield a match group named CommandName. If CommandNamePattern is not specified, the name produced from the target method name, minus any Execute prefix and Command suffix.

CommandPropertyName

Gets or sets the name of the command property to be introduced. The substring {CommandName} will be replaced with the command name determined according to CommandNamePattern. If CommandPropertyName is not specified the name produced by appending the Command suffix to the command name.

ConsiderCanExecuteMethod

Gets or sets a value indicating whether the aspect should look for a CanExecutemethod. The default value is true.

ConsiderCanExecuteProperty

Gets or sets a value indicating whether the aspect should look for a CanExecuteproperty. The default value is true.

IsCanExecuteRequired

Gets or sets a value indicating whether a matching valid unambiguous can-execute method or property must be found for a match to be considered successful. The default value is true when CanExecutePatterns is specified, otherwise false.

Name

Gets or sets the name of the naming convention.

Methods

Name Description
Equals(CommandNamingConvention?)
Equals(object?)
GetHashCode()
ToString()

Operators

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