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

            _appFactory = appFactory;
            _appSetting = appFactory.GetAppSetting();
            _logger     = appFactory.GetLogger();
        }
コード例 #3
0
ファイル: Application.cs プロジェクト: Roustalski/LiteMvc
 /// <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;
 }
コード例 #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);
        }
コード例 #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>();
    }
コード例 #6
0
        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);
        }
コード例 #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
            };
        }
コード例 #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();
        }
コード例 #9
0
 public Spoofing2Command(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #10
0
 public DemoNetworkingCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #11
0
 public DemoTradeFileCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #12
0
 public void Setup_Iteration()
 {
     this._appFactory = A.Fake <IAppFactory>();
 }
コード例 #13
0
 public TradingSpoofingProcessFactory(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #14
0
 public Mediator(IAppFactory appFactory)
 {
     this._appFactory      = appFactory ?? new AppFactory(new Configuration.Configuration());
     this._commandManager  = this._appFactory.CommandManager;
     this._commandManifest = this._appFactory.CommandManifest;
 }
コード例 #15
0
 public DemoCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
コード例 #16
0
 private SingleAppFactoryProvider(IAppFactory factory)
 {
     _factory = factory;
 }
コード例 #17
0
 public HighVolumeCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #18
0
 public DemoDataGenerationCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
コード例 #19
0
 public NukeCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory;
 }
コード例 #20
0
 public Cancellation2Command(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #21
0
 public MarkingTheCloseCommand(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
コード例 #22
0
 public TradingCancelledFactory(IAppFactory appFactory)
 {
     this._appFactory = appFactory ?? throw new ArgumentNullException(nameof(appFactory));
 }
 public void Setup()
 {
     this._appFactory = A.Fake <IAppFactory>();
 }
コード例 #24
0
 public WashTradeCommand(IAppFactory factory)
 {
     this._appFactory = factory ?? throw new ArgumentNullException(nameof(factory));
 }