void RegistrateUnsafe(Type type, CommandAttribute attribute) { var sketch = new CommandSketch(attribute, type, () => (ICommand)Activator.CreateInstance(type)); this.Registrate(sketch); }
void Registrate(Type type, CommandAttribute attribute) { ReflectionTools.ThrowIfItIsNotValidCommand(type); RegistrateUnsafe(type, attribute); }