public ScheduleRuleCommand(IAppFactory appFactory)
 {
     this._console        = appFactory.Console;
     this._awsQueueClient = appFactory.AwsQueueClient;
     this._serialiser     = appFactory.ScheduledExecutionSerialiser;
     this._configuration  = appFactory.Configuration;
 }
Example #2
0
        public MainForm(IAppFactory appFactory)
        {
            InitializeComponent();

            _appFactory = appFactory;
            _appSetting = appFactory.GetAppSetting();
            _logger     = appFactory.GetLogger();
        }
Example #3
0
 /// <summary>
 /// TODO: Create docs
 /// </summary>
 /// <param name="busCircularLimit"></param>
 /// <param name="address"></param>
 /// <param name="gateway"></param>
 public Application(IDictionary clientHash, IBus bus, IService service, Assembly assembler, IAppFactory maker)
 {
     _clientHash = clientHash;
     _bus = bus;
     _service = service;
     _assembler = assembler;
     _maker = maker;
 }
Example #4
0
        public LoginViewModel(IAppServices services, IAppFactory factory, IMessenger messenger)
        {
            _services  = services ?? throw new ArgumentNullException(nameof(services));
            _factory   = factory ?? throw new ArgumentNullException(nameof(factory));
            _messenger = messenger ?? throw new ArgumentNullException(nameof(messenger));

            LoginCommand      = new RelayCommand(LoginCommandMethod);
            CreateUserCommand = new RelayCommand(CreateUserCommandMethod);
        }
Example #5
0
    public Application(IServiceProvider provider, ILogger <Application> logger, IAppFactory appFactory)
    {
        _provider   = provider;
        _logger     = logger;
        _appFactory = appFactory;

        // Can be missing so it is not injected in the constructor
        _appStateManager = provider.GetService <IAppStateManager>();
    }
        public void Setup()
        {
            this._console        = A.Fake <IConsole>();
            this._awsQueueClient = A.Fake <IAwsQueueClient>();
            this._serialiser     = A.Fake <IScheduledExecutionMessageBusSerialiser>();
            this._configuration  = A.Fake <INetworkConfiguration>();

            this._appFactory = A.Fake <IAppFactory>();

            A.CallTo(() => this._appFactory.Console).Returns(this._console);
            A.CallTo(() => this._appFactory.AwsQueueClient).Returns(this._awsQueueClient);
            A.CallTo(() => this._appFactory.ScheduledExecutionSerialiser).Returns(this._serialiser);
            A.CallTo(() => this._appFactory.Configuration).Returns(this._configuration);
        }
Example #7
0
        public CommandManager(IAppFactory appFactory, IProgramState programState, ILogger logger, IConsole console)
        {
            this._unRecognisedCommand = new UnRecognisedCommand();
            this._console             = console ?? throw new ArgumentNullException(nameof(console));
            this._logger = logger ?? throw new ArgumentNullException(nameof(logger));

            if (appFactory == null)
            {
                throw new ArgumentNullException(nameof(appFactory));
            }

            this._commands = new List <ICommand>
            {
                new InitiateCommand(programState, this),
                new HelpCommand(),
                new QuitCommand(programState),
                new DemoCommand(appFactory),
                new DemoCsvCommand(appFactory),
                new DemoNetworkingCommand(appFactory),
                new DemoTradeFileCommand(appFactory),
                new DemoTradeFileNetworkingCommand(appFactory),
                new SpoofingCommand(appFactory),
                new ScheduleRuleCommand(appFactory),
                new DemoMarketEquityFileCommand(appFactory),
                new DemoMarketEquityFileNetworkingCommand(appFactory),
                new CancellationCommand(appFactory),
                new NukeCommand(appFactory),
                new DemoDataGenerationCommand(appFactory),
                new Cancellation2Command(appFactory),
                new HighVolumeCommand(appFactory),
                new MarkingTheCloseCommand(appFactory),
                new Spoofing2Command(appFactory),
                new LayeringCommand(appFactory),
                new HighProfitCommand(appFactory),
                new WashTradeCommand(appFactory),
                this._unRecognisedCommand
            };
        }
Example #8
0
        static void Test(Dtf.Core.IEndpoint endpoint)
        {
            // launch app
            IAppFactory localAppFactory = endpoint.QueryInterface <IAppFactory>();
            IApp        app             = localAppFactory.Create(@"Calc.exe");

            app.Launch();
            Thread.Sleep(1000);

            CallbackResourceHandler.Callback = (s) =>
            {
                return("1845951237");
            };

            var localCalc = new CalcUi(endpoint);

            localCalc.Ui.Calculator.One.Invoke();
            localCalc.Ui.Calculator.Plus.Invoke();
            localCalc.Ui.Calculator.Two.Invoke();
            localCalc.Ui.Calculator.Equals.Invoke();
            Debug.Assert(localCalc.Ui.Calculator.Result.GetProperty("Name").Replace("Display is ", string.Empty).Trim().Equals("3"));
            app.Close();
        }
 public Spoofing2Command(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public DemoNetworkingCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public DemoTradeFileCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public void Setup_Iteration()
 {
     this._appFactory = A.Fake <IAppFactory>();
 }
Example #13
0
 public TradingSpoofingProcessFactory(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
Example #14
0
 public Mediator(IAppFactory appFactory)
 {
     this._appFactory      = appFactory ?? new AppFactory(new Configuration.Configuration());
     this._commandManager  = this._appFactory.CommandManager;
     this._commandManifest = this._appFactory.CommandManifest;
 }
Example #15
0
 public DemoCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
Example #16
0
 private SingleAppFactoryProvider(IAppFactory factory)
 {
     _factory = factory;
 }
 public HighVolumeCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
Example #18
0
 public DemoDataGenerationCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
 public NukeCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
 public Cancellation2Command(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public MarkingTheCloseCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
Example #22
0
 public TradingCancelledFactory(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public void Setup()
 {
     this._appFactory = A.Fake <IAppFactory>();
 }
 public WashTradeCommand(IAppFactory factory)
 {
     this._appFactory = factory ?? throw new ArgumentNullException(nameof(factory));
 }