public void Registrate(Type type) { ReflectionTools.ThrowIfItIsNotValidCommand(type); var cmdAttribute = ReflectionTools.GetCommandAttributeOrThrow(type); this.Registrate(type, cmdAttribute); }
/// <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); }
void Registrate(Type type, CommandAttribute attribute) { ReflectionTools.ThrowIfItIsNotValidCommand(type); RegistrateUnsafe(type, attribute); }