public ServiceController(IWorkContext workContext, IServicesService servicesService, IUploadService uploadService, BanobatDbContext dbContext) : base(workContext) { _workContext = workContext; _servicesService = servicesService; _uploadService = uploadService; _dbContext = dbContext; }
private void cboServices_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (cboServices.SelectedValue != null) { BackgroundWorker worker = new BackgroundWorker(); loadingAnimation.Visibility = Visibility.Visible; worker.DoWork += delegate(object s, DoWorkEventArgs args) { object[] data = args.Argument as object[]; IServicesService servicesService = ObjectLocator.GetInstance <IServicesService>(); Dictionary <License, List <LicenseSet> > _servicesData = servicesService.GetServiceLicenses((Service)data[0]); args.Result = _servicesData; }; worker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args) { servicesData = (Dictionary <License, List <LicenseSet> >)args.Result; gridRemoteServices.ItemsSource = DataConverters.ConvertAllLicensesSetsToDisplay(servicesData); loadingAnimation.Visibility = Visibility.Collapsed; }; worker.RunWorkerAsync(new object[] { cboServices.SelectedValue }); } }
public async Task Delete_WithOrderData_ShouldDeleteSuccessfully() { var errorMessagePrefix = "ServicesService DeleteByIdAsync() method does not work properly."; var dbContext = ApplicationDbContextInMemoryFactory.InitializeContext(); await this.SeedData(dbContext); await dbContext.ServiceOrders.AddAsync(new ServiceOrder { ServiceId = 1, }); await dbContext.SaveChangesAsync(); this.servicesService = new ServicesService(dbContext); var testId = dbContext.Services.First().To <ServicesServiceModel>().Id; await this.servicesService.DeleteByIdAsync(testId); var expectedCount = 1; var actualCount = dbContext.Services.Count(); Assert.True(expectedCount == actualCount, errorMessagePrefix); }
public DataTable GetServicesInfo() { _services = new ServicesService(_scope, _options); var serviceNamesList = _services.GetAllServices(); return(CreateExcelFile.ListToDataTable(serviceNamesList, "Services")); }
public async Task GetAllServices_WithDummyData_ShouldReturnCorrectResult() { MapperInitializer.InitializeMapper(); var errorMessagePrefix = "ServicesService GetAllServicesAsync() method does not work properly."; var dbContext = ApplicationDbContextInMemoryFactory.InitializeContext(); await this.SeedData(dbContext); this.servicesService = new ServicesService(dbContext); var actualResult = await this.servicesService.GetAllServicesAsync <ServicesServiceModel>().ToListAsync(); var expectedResult = this.GetDummyData().To <ServicesServiceModel>().ToList(); Assert.True(actualResult.Count == expectedResult.Count, errorMessagePrefix); // TODO: // for (int i = 0; i < expectedResult.Count; i++) // { // var expectedEntry = expectedResult[i]; // var actualEntry = actualResult[i]; // Assert.True(expectedEntry.Name == actualEntry.Name, errorMessagePrefix + " " + "Name is not return properly."); // Assert.True(expectedEntry.Description == actualEntry.Description, errorMessagePrefix + " " + "Description is not return properly."); // Assert.True(expectedEntry.Picture == actualEntry.Picture, errorMessagePrefix + " " + "Picture is not return properly."); // Assert.True(expectedEntry.ProductType.Name == actualEntry.ProductType.Name, errorMessagePrefix + " " + "ProductType Name is not return properly."); // } }
public ServicesServiceTests() { //create InMemory DbContext var builder = new DbContextOptionsBuilder <AlgDbContext>(); builder.UseInMemoryDatabase("ServicesServiceTests") .EnableSensitiveDataLogging(); var options = builder.Options; var context = new AlgDbContext(options); context.Database.EnsureDeleted(); context.Database.EnsureCreated(); _usersRepository = new UsersRepository(context); //create UsersService _servicesRepository = new ServicesRepository(context); var config = new MapperConfiguration(c => { c.AddProfile <ServicesMapProfile>(); }); _mapper = config.CreateMapper(); _settings = new PagingSettings { PageSize = 4 }; _servicesService = new ServicesService(_servicesRepository, _mapper, Microsoft.Extensions.Options.Options.Create(_settings)); //seed with initial data new UsersSeeds(context).Seed(); new ServicesSeeds(context).Seed(); }
public ServicesPageController(IServicesService serviceService, IUniquePageService uniquepageService, INotificationHubService notificationHubService, IPageMessageSvc pageMessageSvc) { _serviceService = serviceService; _uniquePageService = uniquepageService; _notificationHubService = notificationHubService; _pageMessageSvc = pageMessageSvc; }
public InvoicesService( IDeletableEntityRepository <Invoice> invoicesRepository, IServicesService servicesService) { this.invoicesRepository = invoicesRepository; this.servicesService = servicesService; }
/// <summary> /// Initializes a new instance of the <see cref="ServicesController" /> class. /// </summary> /// <param name="servicesService">The services service.</param> public ServicesController(IServicesService servicesService) : base(new VisualStudioService(), new ReadMeService(), new SettingsService()) { TraceService.WriteLine("ServicesController::Constructor"); this.servicesService = servicesService; }
public ServiceController(IStringLocalizer <ServiceController> localzier, IBuildingService buildingService, IServicesService servicesService) : base(buildingService) { _localzier = localzier; _buildingService = buildingService; _servicesService = servicesService; }
// GET: Task public TaskController(IHelperService helperService, ISmsService smsSvc, IEnrolleeService enrolleeService, ILogAdminService loggersvc, IProviderService providersvc, ISession session, IEmailSender emailSender, SiteSettings siteSettings, Site site, IPlanService planService, IUniquePageService uniquepageService, IPageMessageSvc pageMessageSvc, IServicesService serviceSvc, IProviderService Providersvc, ILogAdminService logger, ICompanyService companyService, UserService userService, IRoleService roleService, MailSettings mailSettings, Services.ClaimService claimserv) { _helperSvc = helperService; _enrolleeService = enrolleeService; _smsservice = smsSvc; _logger = loggersvc; _providerservice = providersvc; _session = session; _emailSender = emailSender; _siteSettings = siteSettings; _site = site; _planService = planService; _uniquePageService = uniquepageService; _pageMessageSvc = pageMessageSvc; _serviceSvc = serviceSvc; _providerSvc = Providersvc; _logger = logger; _companySvc = companyService; _userservice = userService; _rolesvc = roleService; _mailSettings = mailSettings; _claimservice = claimserv; }
public OrdersController(IOrdersService ordersService, IServicesService servicesService, IFilesService filesService, UserManager <ApplicationUser> userManager) { this.ordersService = ordersService; this.servicesService = servicesService; this.filesService = filesService; this.userManager = userManager; }
public TurnsController(ITurnsService turnsService, IDoctorServiceManager doctorServiceManager, IAppointmentService appointmentService, IServiceSupplyService serviceSupplyService, IServicesService servicesService, IBlockedMobileService blockedMobileService, IIPAsManager iPAsManager, IPersonService userService, IAppointmentsManager appointmentsManager, INotificationService notificationService, IOfferRepository offerRepository) { _turnsService = turnsService; _doctorServiceManager = doctorServiceManager; _userService = userService; _appointmentsManager = appointmentsManager; _notificationService = notificationService; _servicesService = servicesService; _blockedMobileService = blockedMobileService; _iPAsManager = iPAsManager; _appointmentService = appointmentService; _serviceSupplyService = serviceSupplyService; _offerRepository = offerRepository; logger = LogManager.GetCurrentClassLogger(); }
public void GetAllServicesCount_WithNoData_ShoultThrowArgumentNullException() { var dbContext = ApplicationDbContextInMemoryFactory.InitializeContext(); this.servicesService = new ServicesService(dbContext); Assert.Throws <ArgumentNullException>(() => this.servicesService.GetCountServices()); }
public NewServiceWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); servicesService = ObjectLocator.GetInstance<IServicesService>(); }
public NewServiceWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); servicesService = ObjectLocator.GetInstance <IServicesService>(); }
public BusinessmanServicesViewModel(IMvxLogProvider logProvider , IMvxNavigationService navigationService , IServicesService servicesServices) : base(logProvider, navigationService) { _servicesServices = servicesServices; _servicesServices.MyServicesListChanged += ServicesServicesOnMyServicesListChanged; }
public ServicesController(ILogger <AdminController> logger, IServicesService serviceService, IMortgageService mortgageService) { _logger = logger; _serviceService = serviceService; _mortgageService = mortgageService; }
public OrdersController( IOrdersService ordersService, IProductsService productsService, IServicesService servicesService) { this.ordersService = ordersService; this.productsService = productsService; this.servicesService = servicesService; }
public ViewServicesWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _servicesService = ObjectLocator.GetInstance<IServicesService>(); gridServices.ItemsSource = _servicesService.GetAllServices(); }
public ViewServicesWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _servicesService = ObjectLocator.GetInstance <IServicesService>(); gridServices.ItemsSource = _servicesService.GetAllServices(); }
/// <summary> /// Constructor. /// </summary> /// <param name="servicesService">Services service.</param> /// <param name="serviceHealthService">Searvices health service.</param> /// <param name="consensusContext">Context of consensus protocol.</param> public ServicesController( IServicesService servicesService, IServiceHealthService serviceHealthService, IConsensusContext consensusContext) { _servicesService = servicesService; _serviceHealthService = serviceHealthService; _consensusContext = consensusContext; }
public NewServiceWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); servicesService = ObjectLocator.GetInstance<IServicesService>(); gridServices.DataSource = servicesService.GetAllNonInitializedNonTestedServices(); }
public async Task Create_WithNull_ShouldThrowArgumentNullException() { var dbContext = ApplicationDbContextInMemoryFactory.InitializeContext(); this.servicesService = new ServicesService(dbContext); await Assert.ThrowsAsync <ArgumentNullException>(async() => await this.servicesService.CreateServiceAsync(null)); }
public LogReplicationHandler( IServiceHealthService serviceHealthService, IServicesService servicesService, IKvPropertyService kvPropertyService) { _serviceHealthService = serviceHealthService; _servicesService = servicesService; _kvPropertyService = kvPropertyService; }
public ServicesController( ICategoriesService categoriesService, IServicesService servicesService, ICloudinaryService cloudinaryService) { this.categoriesService = categoriesService; this.servicesService = servicesService; this.cloudinaryService = cloudinaryService; }
public CardController(UserManager <AppUser> userManager, ICardService cardService, IUserService userService, IPacientService pacientService, IServicesService servicesService) { _userManager = userManager; _cardService = cardService; _userService = userService; _pacientService = pacientService; _servicesService = servicesService; }
public BusinessmanProfileViewModel(IMvxNavigationService navigationService, IProfileService profileService, ISubscribeService subscribeService, IServicesService servicesService) { _navigationService = navigationService; _profileService = profileService; _subscribeService = subscribeService; _servicesService = servicesService; }
public UploadProductsWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _servicesService = ObjectLocator.GetInstance<IServicesService>(); _licenseSetService = ObjectLocator.GetInstance<ILicenseSetService>(); _licenseService = ObjectLocator.GetInstance<ILicenseService>(); }
public ServicesServiceTests() { this.services = new List <Service>(); var servicesRepository = new EfDeletableEntityRepository <Service>(this.DbContext); this.service = new ServicesService(servicesRepository); this.InitializeRepositoriesData(); }
public ScheduleController(IScheduleService scheduleService , IPersonnelService personnelService , IUserService userService , IServicesService servicesService) { _scheduleService = scheduleService; _personnelService = personnelService; _userService = userService; _servicesService = servicesService; }
public async Task Delete_WithNonExistentServiceId_ShouldThrowArgumentNullException() { var dbContext = ApplicationDbContextInMemoryFactory.InitializeContext(); await this.SeedData(dbContext); this.servicesService = new ServicesService(dbContext); await Assert.ThrowsAsync <ArgumentNullException>(async() => await this.servicesService.DeleteByIdAsync(3)); }
public UploadProductsWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _servicesService = ObjectLocator.GetInstance <IServicesService>(); _licenseSetService = ObjectLocator.GetInstance <ILicenseSetService>(); _licenseService = ObjectLocator.GetInstance <ILicenseService>(); }
public BusinessController(IBusinessService businessService , IPersonnelService personnelService , IServicesService servicesService , IUserService userService) { _businessService = businessService; _personnelService = personnelService; _servicesService = servicesService; _userService = userService; }
public ServiceInitializationWindow() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _eventAggregator = ObjectLocator.GetInstance<IEventAggregator>(); _eventAggregator.AddListener<ServiceTestingEvent>(x => ServiceTestingAndInitialization(x)); _servicesService = ObjectLocator.GetInstance<IServicesService>(); }
public ServicesScreen() { InitializeComponent(); WindowHelper.CheckAndApplyTheme(this); _servicesService = ObjectLocator.GetInstance<IServicesService>(); _eventAggregator = ObjectLocator.GetInstance<IEventAggregator>(); _eventAggregator.AddListener<ServicesUpdatedEvent>(x => gridServices.ItemsSource = _servicesService.GetAllServices()); }
/// <summary> /// Initializes a new instance of the <see cref="ServicesController" /> class. /// </summary> /// <param name="configurationService">The configuration service.</param> /// <param name="servicesService">The services service.</param> /// <param name="nugetService">The nuget service.</param> /// <param name="visualStudioService">The visual studio service.</param> /// <param name="readMeService">The read me service.</param> /// <param name="settingsService">The settings service.</param> /// <param name="messageBoxService">The message box service.</param> /// <param name="resolverService">The resolver service.</param> public ServicesController( IConfigurationService configurationService, IServicesService servicesService, INugetService nugetService, IVisualStudioService visualStudioService, IReadMeService readMeService, ISettingsService settingsService, IMessageBoxService messageBoxService, IResolverService resolverService) : base(configurationService, visualStudioService, readMeService, settingsService, messageBoxService, resolverService) { TraceService.WriteLine("ServicesController::Constructor"); this.servicesService = servicesService; this.nugetService = nugetService; }
/// <summary> /// Initializes a new instance of the <see cref="ServicesController" /> class. /// </summary> /// <param name="servicesService">The services service.</param> /// <param name="nugetService">The nuget service.</param> /// <param name="visualStudioService">The visual studio service.</param> /// <param name="readMeService">The read me service.</param> /// <param name="settingsService">The settings service.</param> /// <param name="messageBoxService">The message box service.</param> /// <param name="dialogService">The dialog service.</param> /// <param name="formsService">The forms service.</param> public ServicesController( IServicesService servicesService, INugetService nugetService, IVisualStudioService visualStudioService, IReadMeService readMeService, ISettingsService settingsService, IMessageBoxService messageBoxService, IDialogService dialogService, IFormsService formsService) : base(visualStudioService, readMeService, settingsService, messageBoxService, dialogService, formsService) { TraceService.WriteLine("ServicesController::Constructor"); this.servicesService = servicesService; this.nugetService = nugetService; }
public ServicesController(IServicesService servicesService) { _servicesService = servicesService; }
public RegistratedServicesController(IServicesService servicesService) { _servicesService = servicesService; }
public ServicesController(IServicesService servicesService,ISettingsService settingsService) { _servicesService = servicesService; _settingsService = settingsService; }
public ServicesRepository(IServicesService servicesService) { _servicesService = servicesService; }