public RoleService(IRepository <Role> repositoryRole, IRepository <RoleHistory> repositoryRoleHistory, IRepository <RolePermissionLine> repositoryRolePermissionLine, IRepository <User> repositoryUser, IRepository <RoleUserLine> repositoryRoleUserLine, IRepository <Permission> repositoryPermission, IRepository <RolePermissionLineHistory> repositoryRolePermissionLineHistory, IMainService serviceMain) { _repositoryRole = repositoryRole; _repositoryRoleHistory = repositoryRoleHistory; _repositoryRolePermissionLine = repositoryRolePermissionLine; _repositoryUser = repositoryUser; _repositoryRoleUserLine = repositoryRoleUserLine; _repositoryPermission = repositoryPermission; _repositoryRolePermissionLineHistory = repositoryRolePermissionLineHistory; _serviceMain = serviceMain; }
/// <summary> /// /// </summary> /// <param name="view"></param> /// <param name="service"></param> /// <param name="controller"></param> /// <param name="commandsProxy"></param> public MainTreePresenter(IMainTreeView view, IMainService service, IMainController controller, GlobalCommandsProxy commandsProxy) { this.service = service; this.controller = controller; this.commandsProxy = commandsProxy; this.View = view; this.View.NodeSelected += View_NodeSelected; this.OpenCommand = new DelegateCommand <object>(this.Open); this.commandsProxy.OpenCommand.RegisterCommand(this.OpenCommand); }
/// <summary> /// Initializes the instance of the <see cref="QuartzServer" /> class. /// </summary> public virtual void Initialize(short WEBAPIPORT) { try { webport = WEBAPIPORT; xtradeServer = Program.Container.Resolve <IMainService>(); } catch (Exception e) { Log.Error("Server initialization failed:" + e.Message, e); throw; } }
public SystemNetSmtp(IMainService serviceMain) { _smtpClient = new CustomSmtpClient { EnableSsl = serviceMain.ApplicationSettings.SmtpSsl, Host = serviceMain.ApplicationSettings.SmtpServer, Port = serviceMain.ApplicationSettings.SmtpPort, Username = serviceMain.ApplicationSettings.SmtpUser, Password = serviceMain.ApplicationSettings.SmtpPassword, UseDefaultCredentials = serviceMain.ApplicationSettings.UseDefaultCredentials, UseDefaultNetworkCredentials = serviceMain.ApplicationSettings.UseDefaultNetworkCredentials }; }
public MailKitSmtp(IMainService serviceMain) { var applicationSettings = serviceMain.ApplicationSettings; _smtpClient = new CustomSmtpClient { EnableSsl = applicationSettings.SmtpSsl, Host = applicationSettings.SmtpServer, Port = applicationSettings.SmtpPort, Username = applicationSettings.SmtpUser, Password = applicationSettings.SmtpPassword }; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// Notice we are doing dependency injection with this one. /// If we wanted to write unit tests for this, we would inject a fake/mock DataService in here. /// </summary> public MainViewModel(IMainService dataService) { _dataService = dataService; //go get the data _dataService.GetData( (item, error) => { WelcomeTitle = item.Title; }); this.CurrentContentView = this; }
public CategoryService(IRepository <Category> repositoryCategory, IRepository <CategoryHistory> repositoryCategoryHistory, IRepository <Language> repositoryLanguage, IRepository <User> repositoryUser, IRepository <CategoryLanguageLine> repositoryCategoryLanguageLine, IRepository <CategoryLanguageLineHistory> repositoryCategoryLanguageLineHistory, IRepository <Content> repositoryContent, IMainService serviceMain) { _repositoryCategory = repositoryCategory; _repositoryCategoryHistory = repositoryCategoryHistory; _repositoryLanguage = repositoryLanguage; _repositoryUser = repositoryUser; _repositoryCategoryLanguageLine = repositoryCategoryLanguageLine; _repositoryCategoryLanguageLineHistory = repositoryCategoryLanguageLineHistory; _repositoryContent = repositoryContent; _serviceMain = serviceMain; _defaultLanguage = _repositoryLanguage.Get(x => x.DisplayOrder == 1); }
public UserService(IRepository <User> repositoryUser, IRepository <RolePermissionLine> repositoryRolePermissionLine, IRepository <PermissionMenuLine> repositoryPermissionMenuLine, IRepository <RoleUserLine> repositoryRoleUserLine, IRepository <UserHistory> repositoryUserHistory, ISmtp smtp, IRepository <Person> repositoryPerson, IRepository <PersonHistory> repositoryPersonHistory, IRepository <Role> repositoryRole, IRepository <RoleUserLineHistory> repositoryRoleUserLineHistory, IMainService serviceMain) { _repositoryUser = repositoryUser; _repositoryRolePermissionLine = repositoryRolePermissionLine; _repositoryPermissionMenuLine = repositoryPermissionMenuLine; _repositoryRoleUserLine = repositoryRoleUserLine; _repositoryUserHistory = repositoryUserHistory; _smtp = smtp; _repositoryPerson = repositoryPerson; _repositoryPersonHistory = repositoryPersonHistory; _repositoryRole = repositoryRole; _repositoryRoleUserLineHistory = repositoryRoleUserLineHistory; _serviceMain = serviceMain; }
public AuthenticationService(IRepository <User> repositoryUser, IRepository <SessionHistory> repositorySessionHistory, IRepository <Session> repositorySession, IRepository <RoleUserLine> repositoryRoleUserLine, IRepository <Role> repositoryRole, IRepository <Person> repositoryPerson, IRepository <UserHistory> repositoryUserHistory, ISmtp smtp, IMainService serviceMain) { _repositoryUser = repositoryUser; _repositorySessionHistory = repositorySessionHistory; _repositorySession = repositorySession; _repositoryRoleUserLine = repositoryRoleUserLine; _repositoryRole = repositoryRole; _repositoryPerson = repositoryPerson; _repositoryUserHistory = repositoryUserHistory; _smtp = smtp; _serviceMain = serviceMain; }
public App( IEventService eventContainerService, IMainService mainService, IProjects projects, IGroup group, IEventLog eventLog, ISettingsService settingsService ) { this.eventService = eventContainerService; this.mainService = mainService; this.projects = projects; this.group = group; this.eventLog = eventLog; this.settingsService = settingsService; }
/// <summary> /// Initializes the instance of the <see cref="QuartzServer" /> class. /// </summary> public virtual void Initialize(string angularFolder, string envName) { try { XTradeConfig config = Program.Container.Resolve <XTradeConfig>(); xtradeServer = Program.Container.Resolve <IMainService>(); xtradeServer.Init(Program.Container); Log.Info(String.Format("Inited with AngularFolder: {0}, Env: {1}", angularFolder, envName)); } catch (Exception e) { Log.Error("Server initialization failed:" + e.Message, e); throw; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); startButton = FindViewById <Button>(Resource.Id.button1); stopButton = FindViewById <Button>(Resource.Id.button2); setPhoneNumberButton = FindViewById <Button>(Resource.Id.button3); phoneNumber = (EditText)FindViewById(Resource.Id.phoneNr); startButton.Click += Start_Click; stopButton.Click += Stop_Click; setPhoneNumberButton.Click += SetPhoneNumber; service = App.Container.Resolve <IMainService>(); phoneNumber.Text = service.GetSelectedPhone(); }
public MainController( IRepository<MainRecord> mainRepository, IAuthenticationService authenticationService, IMembershipService membershipService, IOrchardServices orchardServices, IContentManager contentManager, IMainService mainService) { _authenticationService = authenticationService; _membershipService = membershipService; _orchardServices = orchardServices; _contentManager = contentManager; _mainService = mainService; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public MainController( IRepository <MainRecord> mainRepository, IAuthenticationService authenticationService, IMembershipService membershipService, IOrchardServices orchardServices, IContentManager contentManager, IMainService mainService) { _authenticationService = authenticationService; _membershipService = membershipService; _orchardServices = orchardServices; _contentManager = contentManager; _mainService = mainService; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public UserService(IRepository <User> repositoryUser, IRepository <RolePermissionLine> repositoryRolePermissionLine, IRepository <PermissionMenuLine> repositoryPermissionMenuLine, IRepository <RoleUserLine> repositoryRoleUserLine, IRepository <UserHistory> repositoryUserHistory, ISmtp smtp, IRepository <Person> repositoryPerson, IRepository <PersonHistory> repositoryPersonHistory, IRepository <Role> repositoryRole, IRepository <RoleUserLineHistory> repositoryRoleUserLineHistory, IMainService serviceMain, IRepository <Language> repositoryLanguage) { _repositoryUser = repositoryUser; _repositoryRolePermissionLine = repositoryRolePermissionLine; _repositoryPermissionMenuLine = repositoryPermissionMenuLine; _repositoryRoleUserLine = repositoryRoleUserLine; _repositoryUserHistory = repositoryUserHistory; _smtp = smtp; _repositoryPerson = repositoryPerson; _repositoryPersonHistory = repositoryPersonHistory; _repositoryRole = repositoryRole; _repositoryRoleUserLineHistory = repositoryRoleUserLineHistory; _serviceMain = serviceMain; _repositoryLanguage = repositoryLanguage; _languages = _repositoryLanguage.Get().Where(x => x.IsApproved).OrderBy(x => x.DisplayOrder) .Select(t => new IdName(t.Id, t.Name)).ToList(); }
public WorkOrdersController( IWorkOrderService workOrderService, IClientUserService clientUserService, IMainService mainService, IClientCustomerService clientCustomerService, IProductService productService, ICustomerLocationService customerLocationService, ICustomerService customerService ) { _workOrderService = workOrderService; _clientUserService = clientUserService; _mainService = mainService; _clientCustomerService = clientCustomerService; _productService = productService; _customerLocationService = customerLocationService; _customerService = customerService; }
public PositionsManager() { positions = new ConcurrentDictionary <long, PositionInfo>(); Clients = GlobalHost.ConnectionManager.GetHubContext <TerminalsHub>().Clients; xtrade = Program.Container.Resolve <IMainService>(); todayDeals = new Dictionary <long, DealInfo>(); terminals = new Dictionary <long, Terminal>(); todayStat = new TodayStat(); fillRiskProps(); foreach (var term in xtrade.GetTerminals()) { terminals.Add(term.AccountNumber, term); if (term.Disabled == false) { var acc = new Account(); acc.Number = term.AccountNumber; acc.TerminalId = term.Id; todayStat.Accounts.Add(acc); } } }
public MainPresenter(IMain view, IInstagramService instagramService, IMainService mainService, IVkService vkService, IMessageService messegeService) { _view = view; _instagramService = instagramService; _mainService = mainService; _vkService = vkService; _messegeService = messegeService; _view.BLoadContentEvent += _view_BLoadContent; _view.BGetTockenEvent += _view_BGetTocken; _view.BGenerateTockenEvent += _view_BGenerateTocken; _view.BPostToVKEvent += _view_BPostToVKEvent; _vkService.AppendProgressMaxValue += _vkService_AppendProgressMaxValue; _vkService.AppendProgressMessage += _vkService_AppendProgressMessage; _vkService.AppendProgressValue += _vkService_AppendProgressValue; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IMainService mainService, ISettingsProvider settingsProvider) { var windowTimes = mainService.LoadWindowTimes(); WindowTimes = windowTimes .GroupBy(x => FormatTitle(settingsProvider.Settings.PatternsWithTitleAlias, x.WindowTitle)) .Select(x => new WindowTimesViewModel( x.Key, TimeSpan.FromSeconds(x.Sum(y => y.TotalDuration.TotalSeconds)), TimeSpan.FromSeconds(x.Sum(y => y.IdleDuration.TotalSeconds)), TimeSpan.FromSeconds(x.Sum(y => y.ActiveDuration.TotalSeconds)), x.ToArray())) .OrderByDescending(x => x.ActiveDuration.TotalSeconds); ////if (IsInDesignMode) ////{ //// // Code runs in Blend --> create design time data. ////} ////else ////{ //// // Code runs "for real" ////} }
public PositionsManager() { service = Program.Container.Resolve <IServiceProvider>().GetRequiredService <IMessagingService>(); xtrade = Program.Container.Resolve <IMainService>(); todayDeals = new Dictionary <long, DealInfo>(); terminals = new Dictionary <long, Terminal>(); todayStat = new TodayStat(); fillRiskProps(); loadPositions(); foreach (object t in (List <object>)xtrade.GetObjects(EntitiesEnum.Terminal)) { Terminal term = (Terminal)t; terminals.Add(term.AccountNumber, term); if (term.Retired == false) { var acc = new Account(); acc.Number = term.AccountNumber; acc.TerminalId = term.Id; todayStat.Accounts.Add(acc); } } }
public FormMakeDelivery(IDeliveryService serviceS, IResourceService serviceC, IMainService serviceM) { InitializeComponent(); this.serviceS = serviceS; this.serviceC = serviceC; this.serviceM = serviceM; }
private void GetServices(IMainService mainService) { _logger = mainService.GetLoggerInstance(); _synchronizationContext = mainService.GetSynchronizationContext(); _floorService = mainService.GetFloorServiceInstance(); }
public PermissionController(IPermissionService servicePermission, IMainService serviceMain) { _servicePermission = servicePermission; _serviceMain = serviceMain; }
public MainController() { _MainService = new MainService(new RecipeService(new RecipeDatabaseRepo()), new StockService(new StockDatabaseRepo())); }
public FormMain(IMainService service) { InitializeComponent(); this.service = service; }
public AdminController(IMainService <ProductDTO> pService, IMainService <TopicDTO> tService, IMainService <SubscribeDTO> sService) { productService = pService; topicService = tService; subscribeService = sService; }
public UserRegistrationPagePresenter(UserRegistrationPageViewModel viewModel, IMainService mainService) { _viewModel = viewModel; _mainService = mainService; _cameraService = mainService.GetCameraServiceInstance(); _personService = mainService.GetPersonServiceInstance(); BuildViewModel(); }
public OwnerStageAnalysisController(ApplicationDbContext context, IMainService mainService) { _context = context; _mainService = mainService; }
public HomeController(IMainService mainservice) { this.mainservice = mainservice; }
public CreateForm(IMainService service) { InitializeComponent(); this.service = service; }
public MenuController(IMenuService serviceMenu, IMainService serviceMain) : base(serviceMenu, serviceMain) { _menuService = serviceMenu; }
public BaseController() { MainService = Program.Container.Resolve <IMainService>(); }
public MainViewModel(IMainService mainservice) { _mainservice = mainservice; GetTimesheets(); }