コード例 #1
0
        public void Registrate(Type type)
        {
            ReflectionTools.ThrowIfItIsNotValidCommand(type);
            var cmdAttribute = ReflectionTools.GetCommandAttributeOrThrow(type);

            this.Registrate(type, cmdAttribute);
        }
コード例 #2
0
        public void Registrate(ICommand exemplar)
        {
            var sketch = new CommandSketch(
                attribute:      ReflectionTools.GetCommandAttributeOrThrow(exemplar.GetType()),
                commandType:    exemplar.GetType(),
                locator:        () => exemplar
                );

            this.Registrate(sketch);
        }