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

            this.Registrate(type, cmdAttribute);
        }
コード例 #2
0
 /// <summary>
 /// Executes a command of a specified type. Сonfiguring is not possible.
 /// </summary>
 /// <param name="scheduleSettings">Launch settings. Use null for a single sync launch</param>
 public void Execute(Type commandType, CommandScheduleSettings scheduleSettings = null)
 {
     ReflectionTools.ThrowIfItIsNotValidCommand(commandType);
     Execute(() => (ICommand)Activator.CreateInstance(commandType), scheduleSettings);
 }
コード例 #3
0
 void Registrate(Type type, CommandAttribute attribute)
 {
     ReflectionTools.ThrowIfItIsNotValidCommand(type);
     RegistrateUnsafe(type, attribute);
 }