public void Registrate(Type type) { ReflectionTools.ThrowIfItIsNotValidCommand(type); var cmdAttribute = ReflectionTools.GetCommandAttributeOrThrow(type); this.Registrate(type, cmdAttribute); }
public void Registrate(ICommand exemplar) { var sketch = new CommandSketch( attribute: ReflectionTools.GetCommandAttributeOrThrow(exemplar.GetType()), commandType: exemplar.GetType(), locator: () => exemplar ); this.Registrate(sketch); }