Interface ICanResolveKeyForCommand
- Namespace
- Cratis.Arc.Commands
- Assembly
- Cratis.Arc.Core.dll
Defines a rule for reading the key a command identifies its target by.
public interface ICanResolveKeyForCommand
- Extension Methods
Remarks
Implementations are discovered, and each is asked in turn until one recognizes a key. The rule Arc ships is asked last, so an application that keys its commands its own way states that once as an implementation of this rather than per command.
This is only consulted when nothing has already resolved the command's key. An integration that owns key resolution — the Chronicle one, which resolves an event source id — writes the key onto the command context itself, and that stands.
Methods
Resolve(object)
Reads the key from a command.
string? Resolve(object command)
Parameters
commandobjectThe command to read.
Returns
- string
The key, or null when this rule recognizes none on the command.