Exemplo n.º 1
1
        static void InitializeENodeFramework()
        {
            var setting = new ConfigurationSetting
            {
                SqlDefaultConnectionString = ConfigurationManager.AppSettings["connectionString"],
                EnableGroupCommitEvent = false
            };
            var assemblies = new[]
            {
                Assembly.Load("NoteSample.Domain"),
                Assembly.Load("NoteSample.CommandHandlers"),
                Assembly.Load("NoteSample.Commands"),
                Assembly.GetExecutingAssembly()
            };
            _configuration = ECommonConfiguration
                .Create()
                .UseAutofac()
                .RegisterCommonComponents()
                .UseLog4Net()
                .UseJsonNet()
                .RegisterUnhandledExceptionHandler()
                .CreateENode(setting)
                .RegisterENodeComponents()
                .UseSqlServerEventStore()
                .RegisterBusinessComponents(assemblies)
                .InitializeBusinessAssemblies(assemblies)
                .UseEQueue()
                .StartEQueue();

            _commandService = ObjectContainer.Resolve<ICommandService>();
            _memoryCache = ObjectContainer.Resolve<IMemoryCache>();
        }
Exemplo n.º 2
0
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            LayerLister layerLister,
            SchemaLoader schemaLoader)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;
            m_layerLister = layerLister;
            
            m_schemaLoader = schemaLoader;

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\CircuitEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
            m_theme = new D2dDiagramTheme();
            m_circuitRenderer = new D2dCircuitRenderer<Module, Connection, ICircuitPin>(m_theme, documentRegistry);
            m_subGraphRenderer = new D2dSubCircuitRenderer<Module, Connection, ICircuitPin>(m_theme);

            // create d2dcontrol for displaying sub-circuit            
            m_d2dHoverControl = new D2dAdaptableControl();
            m_d2dHoverControl.Dock = DockStyle.Fill;
            var xformAdapter = new TransformAdapter();
            xformAdapter.EnforceConstraints = false;//to allow the canvas to be panned to view negative coordinates
            m_d2dHoverControl.Adapt(xformAdapter, new D2dGraphAdapter<Module, Connection, ICircuitPin>(m_circuitRenderer, xformAdapter));
            m_d2dHoverControl.DrawingD2d += new EventHandler(m_d2dHoverControl_DrawingD2d);
        }
Exemplo n.º 3
0
        public HelpWindowViewModel()
        {
            _commandService = ServiceResolver.Get<ICommandService>();

            var commands = _commandService.GetCommandNames()
                .Where(command => !command.Item1.Contains("Base"))
                .OrderBy(command => command.Item1)
                .Select(command => new CommandHelpViewModel
                    {
                        Name = command.Item1,
                        Description = command.Item2,
                        Properties = _commandService.GetCommandProperties(command.Item1)
                                       .Where(prop => prop.Item1 != "Test")
                                       .Select(prop => new CommandPropertyHelpViewModel
                                           {
                                               Name = prop.Item1,
                                               Description = prop.Item2,
                                           })
                                       .ToList(),
                    })
                .ToList();

            Commands = CollectionViewSource.GetDefaultView(commands);
            ClearFilterCommand = new RelayCommand(parameter => CommandFilter = string.Empty);
        }
 public BaseViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
 {
     _MainWindow = mainWindow;
     _CommandService = commandService;
     _QueryService = queryService;
     _Logger = logger;
 }
Exemplo n.º 5
0
        public LayerLister(ICommandService commandService)
            : base(commandService)
        {
            Configure(out m_controlInfo);

            TreeControl.NodeCheckStateEdited += treeControl_NodeCheckStateEdited;
        }
Exemplo n.º 6
0
 public SourceControlCommands(
     ICommandService commandService,
     IDocumentRegistry documentRegistry,
     IDocumentService documentService)
     : base(commandService, documentRegistry, documentService)
 {
 }
Exemplo n.º 7
0
 public StandardShowCommands(
     ICommandService commandService, 
     IContextRegistry contextRegistry)
 {
     m_commandService = commandService;
     m_contextRegistry = contextRegistry;
 }
Exemplo n.º 8
0
 public OscCommands(
     ICommandService commandService,
     OscService oscService)
 {
     CommandService = commandService;
     OscService = oscService;
 }
Exemplo n.º 9
0
        public Service1(IListenerService listenerService, ICommandService commandService)
        {
            _listenerService = listenerService;
            _commandService = commandService;

            InitializeComponent();
        }
Exemplo n.º 10
0
        public void SetUp()
        {
            this.commandService = Substitute.For<ICommandService>();
            this.registrationService = Substitute.For<IRegistrationService>();

            SystemTime.Set(TimeStamp);
        }
Exemplo n.º 11
0
        public TimelineEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            IPaletteService paletteService,
            ISettingsService settingsService)
        {
            s_schemaLoader = new SchemaLoader();
            s_repository.DocumentAdded += repository_DocumentAdded;
            s_repository.DocumentRemoved += repository_DocumentRemoved;

            paletteService.AddItem(Schema.markerType.Type, "Timelines", this);
            paletteService.AddItem(Schema.groupType.Type, "Timelines", this);
            paletteService.AddItem(Schema.trackType.Type, "Timelines", this);
            paletteService.AddItem(Schema.intervalType.Type, "Timelines", this);
            paletteService.AddItem(Schema.keyType.Type, "Timelines", this);
            paletteService.AddItem(Schema.timelineRefType.Type, "Timelines", this);

            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_settingsService = settingsService;
        }
Exemplo n.º 12
0
 public TestCollectionService(IConfigurationService configurationService, IFileService fileService, ICommandService commandService, IManifestService manifestService)
 {
     _configurationService = configurationService;
     _fileService = fileService;
     _commandService = commandService;
     _manifestService = manifestService;
 }
Exemplo n.º 13
0
        public Editor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IDocumentService documentService,
            IDocumentRegistry documentRegistry,
            IFileDialogService fileDialogService
            )
        {
            m_commandService = commandService;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_documentRegistry = documentRegistry;
            m_fileDialogService = fileDialogService;

            // create a document client for each file type
            m_txtDocumentClient = new DocumentClient(this, ".txt");
            m_csDocumentClient = new DocumentClient(this, ".cs");
            m_luaDocumentClient = new DocumentClient(this, ".lua");
            m_nutDocumentClient = new DocumentClient(this, ".nut");
            m_pyDocumentClient = new DocumentClient(this, ".py");
            m_xmlDocumentClient = new DocumentClient(this, ".xml");
            m_daeDocumentClient = new DocumentClient(this, ".dae");
            m_cgDocumentClient = new DocumentClient(this, ".cg");

        }
Exemplo n.º 14
0
Arquivo: Editor.cs Projeto: Joxx0r/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            SchemaLoader schemaLoader,
            DiagramTheme diagramTheme)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;

            m_schemaLoader = schemaLoader;

            m_theme = new D2dDiagramTheme();
            m_fsmRenderer = new D2dDigraphRenderer<State, Transition>(m_theme);

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\FsmEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
        }
Exemplo n.º 15
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="commandService">Command service</param>
 /// <param name="providers">Enumeration of context menu command providers</param>
 public ContextMenuAdapter(
     ICommandService commandService,
     IEnumerable<Lazy<IContextMenuCommandProvider>> providers)
 {
     m_commandService = commandService;
     m_providers = providers;
 }
 public ProposalController(ICommandService commandService, IProjectDao projectDao, IProposalDao proposalDao,ISubprocessDao subprocessDao)
 {
     this.projectDao = projectDao;
     this.commandService = commandService;
     this.proposalDao = proposalDao;
     this.subprocessDao = subprocessDao;
 }
 public ContractController(ICommandService commandService, IProjectDao projectDao, ISubprocessDao subprocessDao,IControlTableDao controlDao)
 {
     _projectDao = projectDao;
     _commandService = commandService;
     _subprocessDao = subprocessDao;
     _controlDao = controlDao;
 }
Exemplo n.º 18
0
 public StandardSelectionCommands(ICommandService commandService, IContextRegistry contextRegistry)
 {
     m_commandService = commandService;
     m_contextRegistry = contextRegistry;
     m_contextRegistry.ActiveContextChanged += ActiveContextChanging;
     m_contextRegistry.ActiveContextChanged += ActiveContextChanged;
 }
Exemplo n.º 19
0
 public OscCommandReceiver(ICommandService commandService, IOscService oscService)
 {
     //We only currently work with CommandServiceBase since there's no other way to
     //  get the registered CommandInfo objects. Maybe create an ICommandInfoProvider?
     m_commandService = (CommandServiceBase)commandService;
     m_oscService = oscService;
 }
Exemplo n.º 20
0
 public CircuitTestCommands(ICommandService commandService, 
     IContextRegistry contextRegistry,
     SchemaLoader schemaLoader)
 {
     m_commandService = commandService;
     m_schemaLoader = schemaLoader;
 }
Exemplo n.º 21
0
 public LevelEditorFileCommands(
     ICommandService commandService,
     IDocumentRegistry documentRegistry,
     IFileDialogService fileDialogService) : base(commandService,documentRegistry,fileDialogService)
 {
     RegisterCommands = (RegisterCommands & ~(CommandRegister.FileSaveAll | CommandRegister.FileClose));
 }
Exemplo n.º 22
0
 public AvsysHandler(IAvsysParser parser, ILogger logger, IDeviceRepository deviceRepository, ICommandService commandService)
 {
     this._parser = parser;
     this._logger = logger;
     this._deviceRepository = deviceRepository;
     this._commandService = commandService;
 }
Exemplo n.º 23
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette".Localize(),
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "http://www.ship.scea.com/portal/search/search.action?q=PaletteService+or+Palette&context=resource_WIKI%7CWWSSDKATF".Localize()),
                this);

            m_paletteTreeAdapter = new PaletteTreeAdapter(this, m_searchInput);
        }
Exemplo n.º 24
0
 public GameEditor(
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,            
     IControlHostService controlHostService,
     ICommandService commandService,
     IDocumentService documentService,
     IPaletteService paletteService,
     ISettingsService settingsService,            
     IResourceService resourceService,
     LevelEditorCore.ResourceLister resourceLister,            
     BookmarkLister bookmarkLister
     )
 {
     m_contextRegistry = contextRegistry;
     m_documentRegistry = documentRegistry;
     m_paletteService = paletteService;
     m_settingsService = settingsService;            
     m_documentService = documentService;            
     m_resourceService = resourceService;
     m_resourceLister = resourceLister;            
     m_bookmarkLister = bookmarkLister;
     
     //to-do wire it to to command service
     InputScheme.ActiveControlScheme = new MayaControlScheme();
     ResolveOnLoad = true;
 }
Exemplo n.º 25
0
 public CommandKeyGestureService(
     [ImportMany] CommandDefinition[] commandDefinitions,
     ICommandService commandService)
 {
     _commandDefinitions = commandDefinitions;
     _commandService = commandService;
 }
Exemplo n.º 26
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette", //Is the ID in the layout. We'll localize DisplayName instead.
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "https://github.com/SonyWWS/ATF/search?utf8=%E2%9C%93&q=PaletteService+or+Palette".Localize())
                {
                    DisplayName = "Palette".Localize()
                },
                this);
        }
Exemplo n.º 27
0
        public BookmarkLister(ICommandService commandService)
            : base(commandService)
        {
            Configure(out m_controlInfo);
            m_commandService = commandService;

        }
        public ViewGameResultsViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            CloseCommand = new RelayCommand(x => this.Close());

            Height = 400;
            WindowTitle = "View Game Results";
        }
Exemplo n.º 29
0
 public TestCollectionsController(IUnityContainer container, IRegionManager regionManager, IEventAggregator eventAggregator, ITestCollectionService testCollectionService, ICommandService commandService)
 {
     _container = container;
     _regionManager = regionManager;
     _eventAggregator = eventAggregator;
     _testCollectionService = testCollectionService;
     _commandService = commandService;
 }
Exemplo n.º 30
0
 public ManipulatorCommands(
     IContextRegistry contextRegistry,
     ICommandService commandService)
 {
     m_contextRegistry = contextRegistry;
     m_commandService = commandService;
     
 }
Exemplo n.º 31
0
        public PivotCommands(ICommandService commandService, IContextRegistry contextRegistry)
        {
            m_commandService  = commandService;
            m_contextRegistry = contextRegistry;

            // define functions for moving pivots
            //m_functions = new MovePivot[Enum.GetValues(typeof(Command)).Length];
            m_functions = new Func <Vec3F, AABB, Vec3F> [Enum.GetValues(typeof(Command)).Length];

            m_functions[(int)Command.XMin] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(aabb.Min.X, pivot.Y, pivot.Z));
            };

            m_functions[(int)Command.XCenter] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(aabb.Center.X, pivot.Y, pivot.Z));
            };

            m_functions[(int)Command.XMax] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(aabb.Max.X, pivot.Y, pivot.Z));
            };

            m_functions[(int)Command.YMin] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, aabb.Min.Y, pivot.Z));
            };

            m_functions[(int)Command.YCenter] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, aabb.Center.Y, pivot.Z));
            };

            m_functions[(int)Command.YMax] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, aabb.Max.Y, pivot.Z));
            };

            m_functions[(int)Command.ZMin] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, pivot.Y, aabb.Min.Z));
            };
            m_functions[(int)Command.ZCenter] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, pivot.Y, aabb.Center.Z));
            };
            m_functions[(int)Command.ZMax] = (Vec3F pivot, AABB aabb) =>
            {
                return(new Vec3F(pivot.X, pivot.Y, aabb.Max.Z));;
            };
            m_functions[(int)Command.AllCenter] = (Vec3F pivot, AABB aabb) =>
            {
                return(aabb.Center);
            };
        }
Exemplo n.º 32
0
 static TestBase()
 {
     ConfigSettings.Initialize();
     InitializeENode();
     _commandService      = ObjectContainer.Resolve <ICommandService>();
     _sectionQueryService = ObjectContainer.Resolve <ISectionQueryService>();
     _postQueryService    = ObjectContainer.Resolve <IPostQueryService>();
     _replyQueryService   = ObjectContainer.Resolve <IReplyQueryService>();
     ObjectContainer.Resolve <ILockService>().AddLockKey(typeof(Account).Name);
 }
Exemplo n.º 33
0
 public BenevolenceIndexController(ICommandService commandService, IContextService contextService,
                                   IStoreQueryService storeQueryService,
                                   IWalletQueryService walletQueryService,
                                   IBenevolenceIndexQueryService benevolenceIndexQueryService
                                   ) : base(commandService, contextService)
 {
     _storeQueryService            = storeQueryService;
     _walletQueryService           = walletQueryService;
     _benevolenceIndexQueryService = benevolenceIndexQueryService;
 }
Exemplo n.º 34
0
 public AccountController(ICommandService commandService,
                          IQueryService queryService,
                          ICryptographicService cryptographicService,
                          IIdentityServerInteractionService interactionService)
 {
     _commandService       = commandService;
     _queryService         = queryService;
     _cryptographicService = cryptographicService;
     _interactionService   = interactionService;
 }
Exemplo n.º 35
0
        public void Constructor_NullDecoratee_Throws()
        {
            ICommandService <TranslateSubtitlesFileToNewFile> nullDecoratee = null;
            var stubCalculator          = Substitute.For <ISubtitlesFileCostCalculator>();
            var stubConfirmationService = Substitute.For <IUserConfirmationService>();

            Assert.Throws <ArgumentNullException>(
                () => new TranslationCostConfirmationDecorator(
                    nullDecoratee, stubCalculator, stubConfirmationService));
        }
        public TransactionCommandServiceDecorator(
            ICommandService <TCommand> decoratee)
        {
            if (decoratee == null)
            {
                throw new ArgumentNullException(nameof(decoratee));
            }

            this.decoratee = decoratee;
        }
        public PlayerGamesViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            CloseCommand        = new RelayCommand(x => Close());
            RenamePlayerCommand = new RelayCommand(x => RenamePlayer(), x => CanRenamePlayer());

            Height      = 400;
            Width       = 385;
            WindowTitle = "View Player Games";
        }
 public WebhookHandlerService(ICommandService commandService,
                              ISubscriberService subscriberService,
                              IMapper mapper,
                              IKeyboardService keyboardService)
 {
     this._commandService    = commandService;
     this._subscriberService = subscriberService;
     this._mapper            = mapper;
     this._keyboardService   = keyboardService;
 }
Exemplo n.º 39
0
 public StoreController(ICommandService commandService,
                        StoreQueryService storeQueryService,
                        StoreOrderQueryService storeOrderQueryService,
                        GoodsQueryService goodsQueryService)
 {
     _commandService         = commandService;
     _storeQueryService      = storeQueryService;
     _storeOrderQueryService = storeOrderQueryService;
     _goodsQueryService      = goodsQueryService;
 }
Exemplo n.º 40
0
 public BotController(ICommandService commandService, ITelegramBotClient telegramBotClient, BotContext context,
                      IStateService stateService, IBackgroundJobClient jobClient, INotificationJob notificationJob)
 {
     _db                = context;
     _commandService    = commandService;
     _stateService      = stateService;
     _jobClient         = jobClient;
     _notificationJob   = notificationJob;
     _telegramBotClient = telegramBotClient;
 }
Exemplo n.º 41
0
 public GameProjectLister(
     ICommandService commandService,
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
     : base(commandService)
 {
     m_controlHostService = controlHostService;
     m_contextRegistry    = contextRegistry;
     m_contextRegistry.ActiveContextChanged += ContextRegistry_ActiveContextChanged;
 }
Exemplo n.º 42
0
        public SharedService(
            ICommandService commandService,
            IConfigurationService configService)
        {
            _commandService = commandService;
            _configService  = configService;

            _onSimpleCommand        = _commandService.EventAggregator.Subscribe <byte>(SimpleCommandAction);
            _onParameterizedCommand = _commandService.EventAggregator.Subscribe <KeyValuePair <byte, object> >(ParameterizedCommandAction);
        }
Exemplo n.º 43
0
 public PostController(ICommandService commandService
                       , IPostQueryService queryService
                       , IContextService contextService
                       , ISectionQueryService sectionqueryService)
 {
     _commandService      = commandService;
     _postQueryService    = queryService;
     _contextService      = contextService;
     _sectionQueryService = sectionqueryService;
 }
Exemplo n.º 44
0
 CreateAuditingCommandService <TCommand>(
     ICommandService <TCommand> commandService,
     Scope scope)
 => scope.Get(_ =>
              new AuditingCommandServiceDecorator <TCommand>(
                  this.CreateRepository <AuditEntryEfRepository>(scope),
                  this.CreateContext(scope),
                  this.dateTimeProvider,
                  this.CreateUserContext(scope),
                  commandService));
 /// <summary>
 /// Constructor with parameters.
 /// </summary>
 /// <param name="commandService">Interface to use the command service.</param>
 /// <param name="telegramBotClient">Interface to use the Telegram Bot API.</param>
 /// <param name="userManager">Manager of application users.</param>
 /// <param name="callbackHandler">Handler of user callbacks.</param>
 /// <exception cref="ArgumentNullException"></exception>
 public BotController(ICommandService commandService,
                      ITelegramBotClient telegramBotClient,
                      IUserManager userManager,
                      ICallbackHandler callbackHandler)
 {
     _commandService    = commandService ?? throw new ArgumentNullException(nameof(commandService));
     _telegramBotClient = telegramBotClient ?? throw new ArgumentNullException(nameof(telegramBotClient));
     _userManager       = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _callbackHandler   = callbackHandler ?? throw new ArgumentNullException(nameof(callbackHandler));
 }
Exemplo n.º 46
0
 public CommandBarDynamicMenu(ICommandService commandService, string command)
     : base(commandService, command)
 {
     this.emptyItem           = new MenuItem();
     this.emptyItem.Header    = (object)(string)this.commandService.GetCommandProperty(this.command, "EmptyMenuItemText");
     this.emptyItem.IsEnabled = false;
     this.Items.Add((object)this.emptyItem);
     this.UpdateText();
     this.UpdateEnabled();
 }
Exemplo n.º 47
0
 public AuthController(ICommandService commandService, ITicketGrantingManager ticketGrantingManager,
                       ITicketManager ticketManager, IWebAppManager webAppManager, IAccountService accountService)
     : base(commandService)
 {
     _ticketGrantingManager = ticketGrantingManager;
     _ticketManager         = ticketManager;
     _webAppManager         = webAppManager;
     _accountService        = accountService;
     _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
 }
 public ConfirmChangesMessageHandler(IViewModelCommunication viewModelCommunication,
                                     ICommandService commandService,
                                     ISharedState <AppointmentModifications> appointmentModificationsVariable,
                                     Action <string> errorCallback)
 {
     this.viewModelCommunication           = viewModelCommunication;
     this.commandService                   = commandService;
     this.appointmentModificationsVariable = appointmentModificationsVariable;
     this.errorCallback = errorCallback;
 }
Exemplo n.º 49
0
 public LeaveRoomHandler(
     IMessageQueueService messageQueueService,
     ICommandService <LeaveRoomCommand> leaveRoomService,
     IQueryService <RoomSessionsQuery, string> listRoomSessionsService,
     ILogger <LeaveRoomHandler> logger)
 {
     m_MessageQueueService     = messageQueueService ?? throw new ArgumentNullException(nameof(messageQueueService));
     m_LeaveRoomService        = leaveRoomService ?? throw new ArgumentNullException(nameof(leaveRoomService));
     m_ListRoomSessionsService = listRoomSessionsService ?? throw new ArgumentNullException(nameof(listRoomSessionsService));
     m_Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 50
0
        public CreditCardBiz(ICreditCardService creditCardService, IValidationBuilder validationBuilder, ILogger <CreditCardBiz> logger, ICommandService commandService)
        {
            this.creditCardService = creditCardService;
            this.validationBuilder = validationBuilder;
            this.commandService    = commandService;
            this.logger            = logger;
            var config = new MapperConfiguration(a => { a.CreateMap <AddCreditCard, CreditCard>(); });

            mapper        = config.CreateMapper();
            ErrorMessages = new List <string>();
        }
Exemplo n.º 51
0
 public CommandKeyGestureService(
     [ImportMany] CommandKeyboardShortcut[] keyboardShortcuts,
     [ImportMany] ExcludeCommandKeyboardShortcut[] excludeKeyboardShortcuts,
     ICommandService commandService)
 {
     _keyboardShortcuts = keyboardShortcuts
                          .Except(excludeKeyboardShortcuts.Select(x => x.KeyboardShortcut))
                          .OrderBy(x => x.SortOrder)
                          .ToArray();
     _commandService = commandService;
 }
Exemplo n.º 52
0
        public ResourceListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService     = commandService;
            m_contextRegistry    = contextRegistry;

            m_contextRegistry.ActiveContextChanged += contextRegistry_ActiveContextChanged;
        }
Exemplo n.º 53
0
 public JobFactory()
 {
     _scheduleTaskQueryService       = ObjectContainer.Resolve <IScheduleTaskQueryService>();
     _lotteryQueryService            = ObjectContainer.Resolve <ILotteryQueryService>();
     _normConfigQueryService         = ObjectContainer.Resolve <INormConfigQueryService>();
     _lotteryPredictDataService      = ObjectContainer.Resolve <ILotteryPredictDataService>();
     _lotteryPredictDataQueryService = ObjectContainer.Resolve <ILotteryPredictDataQueryService>();
     _commandService = ObjectContainer.Resolve <ICommandService>();
     _scheduleTasks  = _scheduleTaskQueryService.GetAllScheduleTaskInfos();
     InitScheduleJob();
 }
Exemplo n.º 54
0
 public RecentDocumentCommands(
     ICommandService commandService,
     IDocumentRegistry documentRegistry,
     IDocumentService documentService)
 {
     CommandService = commandService;
     documentRegistry.DocumentAdded += documentRegistry_DocumentAdded;
     m_documentService = documentService;
     documentRegistry.ActiveDocumentChanged += documentRegistry_ActiveDocumentChanged;
     m_recentDocuments.ItemRemoved          += documentInfo_ItemRemoved;
 }
Exemplo n.º 55
0
 public ToolBarBuilder(
     ICommandService commandService,
     [ImportMany] ToolBarDefinition[] toolBars,
     [ImportMany] ToolBarItemGroupDefinition[] toolBarItemGroups,
     [ImportMany] ToolBarItemDefinition[] toolBarItems)
 {
     _commandService    = commandService;
     _toolBars          = toolBars;
     _toolBarItemGroups = toolBarItemGroups;
     _toolBarItems      = toolBarItems;
 }
Exemplo n.º 56
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommandServiceTap{TRoot,TKey}"/> class.
 /// </summary>
 /// <param name="inner">The <see cref="ICommandService{TRoot, TIdentity}"/> to be decorated.</param>
 /// <param name="tap">The tap <see cref="ICommandService{TRoot, TIdentity}"/>, where commands will be mirrored.</param>
 /// <param name="logger">The logger where tap exceptions should be written.</param>
 /// <exception cref="ArgumentNullException"><paramref name="inner"/> is <c>null</c>.
 /// -or- <paramref name="tap"/> is <c>null</c>.</exception>
 public CommandServiceTap(ICommandService <TRoot, TIdentity> inner, ICommandService <TRoot, TIdentity> tap, ILogger logger)
     : base(inner)
 {
     Logger = logger;
     Tap    = (tap ?? throw new ArgumentNullException(nameof(tap)))
              .Catch((Exception ex) =>
     {
         Logger?.LogWarning(0, ex, "An exception ocurred in the 'tap' command service.");
         return(true);
     });
 }
Exemplo n.º 57
0
 public Worker
 (
     ILogger <Worker> logger,
     ICommandService commandService,
     IEndpointInstance endpointInstance
 )
 {
     _logger           = logger;
     _commandService   = commandService;
     _endpointInstance = endpointInstance;
 }
        public CommandHandlerService([NotNull] IServiceProvider serviceProvider)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            _commandService = serviceProvider.GetRequiredService <ICommandService>();
            _commandTargets =
                new ExtensionsCache <CommandTargetInfo, ICommandTarget>(serviceProvider).GetAllExtensions();
        }
Exemplo n.º 59
0
 public StoreController(ICommandService commandService, IContextService contextService,
                        IUserQueryService userQueryService,
                        IStoreQueryService storeQueryService,
                        IStoreOrderQueryService storeOrderQueryService,
                        IGoodsQueryService goodsQueryService) : base(commandService, contextService)
 {
     _userQueryService       = userQueryService;
     _storeQueryService      = storeQueryService;
     _storeOrderQueryService = storeOrderQueryService;
     _goodsQueryService      = goodsQueryService;
 }
Exemplo n.º 60
0
 public DiscordService(IServiceScopeFactory scopeFactory, IEventBus eventBus, ICommandService commandService)
 {
     _scopeFactory = scopeFactory;
     _eventBus     = eventBus;
     _eventBus.TwitchMessageReceived       += TwitchMessageReceived;
     _eventBus.PasswordRequestReceived     += PasswordRequestReceived;
     _eventBus.DiscordMessageSendRequested += SendMessage;
     _eventBus.CommandOutputReceived       += handleCommandResponse;
     this.commandService = commandService;
     SetupClient();
 }