Class DefaultKeyForCommandResolver
- Namespace
- Cratis.Arc.Commands
- Assembly
- Cratis.Arc.Core.dll
Represents the ICanResolveKeyForCommand Arc ships: a command composes its key itself, or marks the property holding it.
[Singleton]
public class DefaultKeyForCommandResolver : ICanResolveKeyForCommand
- Inheritance
-
DefaultKeyForCommandResolver
- Implements
- Inherited Members
- Extension Methods
Remarks
Both rules are things the application says out loud. Nothing is inferred from the shape of a command — a command carrying two identifiers has no answer that is not a guess, and one that grows a second identifier later would silently stop resolving the read model injected somewhere else entirely.
Constructors
DefaultKeyForCommandResolver()
public DefaultKeyForCommandResolver()
Methods
Resolve(object)
Reads the key from a command.
public string? Resolve(object command)
Parameters
commandobjectThe command to read.
Returns
- string
The key, or null when this rule recognizes none on the command.