public App(IClientsService clientsService, IAuthService authService, IOptions <CommonSettings> commonSettings, ILogger <App> logger, IEnumerable <ICommand> commands) { _clientsService = clientsService; _commonSettings = commonSettings.Value; _authService = authService; _logger = logger; foreach (var command in commands) { if (command is not CommandLineApplication commandLineApp) { throw new InvalidCastException("Commands must inherit from ICommand and CommandLineApplication"); } Commands.Add(commandLineApp); } _clientName = Option("-c | --client <name>", "A client name", CommandOptionType.SingleValue); Name = "token"; Description = "Gets a new access token for a specific client"; HelpOption("-? | -h | --help"); OnExecuteAsync(ExecuteAsync); }
private void Setup() { var options = new DbContextOptionsBuilder <ApplicationContext>().Options; _applicationContextMock = new Mock <ApplicationContext>(options); _testedService = new ClientsService(Logger, _applicationContextMock.Object); }
public ClientController( IClientsService clientsService, UserManager <ApplicationUser> userManager) { this.clientsService = clientsService; this.userManager = userManager; }
public async Task Register_Fail(string phone, string password) { Setup(); var listClients = new List <Dal.Models.Client>() { new() { Login = "******" } }; _applicationContextMock.Setup(x => x.Clients).ReturnsDbSet(listClients); _testedService = new ClientsService(Logger, _applicationContextMock.Object); var model = new ClientDto() { Login = phone, Password = password, Name = "Maga" }; var result = await _testedService.Register(model, CancellationToken.None); Assert.Empty(result); }
public ClientsController( IClientsService clientService, IBaseService baseService, ILogger <ClientsController> logger) : base(logger, baseService) { _clientService = clientService; }
public OperatorController(IUserContext userContext, IClientsService clientsService, IClientProfileService clientProfileService) : base(userContext) { Contract.Requires <ArgumentNullException>(clientsService.IsNotNull()); Contract.Requires <ArgumentNullException>(clientProfileService.IsNotNull()); this.clientsService = clientsService; }
public ClientsController( IClientsService clientsService, IMapper mapper) { _clientsService = clientsService; _mapper = mapper; }
public VotesService( IRepository <Vote> votesRepository, IClientsService clientsService) { this.votesRepository = votesRepository; this.clientsService = clientsService; }
/// <summary> /// ApplicationOAuthProvider /// </summary> public ApplicationOAuthProvider() { //_kullanicilarService = WebApiInstaller.Resolve<IKullanicilarService>(); _userService = WebApiInstaller.Resolve <IUsersService>(); _clientService = WebApiInstaller.Resolve <IClientsService>(); _logger = WebApiInstaller.Resolve <ICoreLogger>(); }
public OperatorController(IUserContext userContext, IClientsService clientsService, IClientProfileService clientProfileService) : base(userContext) { Contract.Requires<ArgumentNullException>(clientsService.IsNotNull()); Contract.Requires<ArgumentNullException>(clientProfileService.IsNotNull()); this.clientsService = clientsService; }
public StatisticsController( IStatisticsManager statisticsManager, IClientsService clientsService) { this.statisticsManager = statisticsManager; this.clientsService = clientsService; }
public SendPaymentNotification( IClientsService clientsService, IMailService mailService) { this.clientsService = clientsService; this.mailService = mailService; }
public ClientsController( IClientsService clientsService, IOrdersService ordersService) { _clientsService = clientsService; _ordersService = ordersService; }
public ClientController(IClientsService clientService) { if (clientService != null) { _clientsService = clientService; } }
public ClientsPageViewModel(IClientsService clientsService, IResidencesService residencesService, ISnackbarMessageQueue snackbarMessageQueue, IDialogHost dialogHost, Hotel hotel) { _clientsService = clientsService; _residencesService = residencesService; _snackbarMessageQueue = snackbarMessageQueue; _hotel = hotel; _dialogHost = dialogHost; Clients = new ObservableCollection <Client>(_clientsService.Get()); ClientsViews = (CollectionView)CollectionViewSource.GetDefaultView(Clients); ClientsViews.Filter = ClientsFilter; FilteredFields = new Dictionary <string, string>(Client.Fields) { { AnyFieldFilterValue, "Любое поле" } }; SelectedFilterField = AnyFieldFilterValue; IsContainsFilter = true; SortedFields = new Dictionary <string, string>(Client.Fields) { { NoSortingSortValue, "Не сортировать" } }; SelectedSortField = NoSortingSortValue; IsAscendingSort = true; }
public async Task Login_Fail(string phone, string password) { Setup(); var listClients = new List <Dal.Models.Client>() { new() { Id = 0, Login = "******", Password = "******" } }; _applicationContextMock.Setup(x => x.Clients).ReturnsDbSet(listClients); _testedService = new ClientsService(Logger, _applicationContextMock.Object); var model = new LoginContract() { Login = phone, Password = password }; var result = await _testedService.Login(model, CancellationToken.None); Assert.Empty(result); } }
public CasesController(IJudgesService judgesService, ITrusteesService trusteeService, UserManager <ApplicationUser> userManager, ICasesService casesService, IClientsService clientsService) { this.userManager = userManager; this.judgesService = judgesService; this.trusteeService = trusteeService; this.casesService = casesService; this.clientsService = clientsService; }
public ProjectsController(IProjectService projectsService, IClientsService clientsService, IDeletableEntityRepository <Promoter> promoteRepository, ApplicationDbContext db, IDeletableEntityRepository <Project> projectRepository) { this.projectsService = projectsService; this.clientsService = clientsService; this.promoteRepository = promoteRepository; this.db = db; this.projectRepository = projectRepository; }
public void ReInitializeTest() { _clients = ClientsInitializer.GetAllClients(); _sessionFactory = NHibernateSessionFactory.CreateSessionFactory(DBTypes.SQLite); _unitOfWork = new Mock <IUnitOfWork>(MockBehavior.Default).Object; _clientsMockRepository = SetUpClientsRepository(); _clientsService = new ClientsService(_clientsMockRepository); }
public CashierController( IUserContext userContext, IClientsService clientsService, IPaymentService paymentService) : base(userContext) { this.clientsService = clientsService; this.paymentService = paymentService; }
public AccountController( IUserService userManager, IUserContext userContext, IClientsService userService) { this.userManager = userManager; this.userContext = userContext; this.userService = userService; }
public DotNetKillswitchHandler() { var container = (IKillswitchLocatorContainer) HttpContext.Current.ApplicationInstance; if (container == null) throw new ArgumentException("the current application does not implement IKillswitchLocatorContainer."); _clientService = container.Locator.Resolve<IClientsService>(); _persistence = container.Locator.Resolve<IKillswitchPersistence>(); }
public ApplicationOAuthProvider(string publicClientId, IClientsService clientsService) { if (publicClientId == null) { throw new ArgumentNullException("publicClientId"); } _publicClientId = publicClientId; _clientsService = clientsService; }
public ClientsCommand(IClientsService clientsService, ILogger <ClientsCommand> logger) { _clientsService = clientsService; _logger = logger; Name = "clients"; Description = "Gets list of existing clients"; HelpOption("-? | -h | --help"); OnExecuteAsync(ExecuteAsync); }
public PageRender(EntitiesDbContext context, ICacheService cacheService, UserManager <GearUser> userManager, IHttpContextAccessor contextAccessor, IDynamicPagesContext pagesContext, IOrganizationService <Tenant> organizationService, IClientsService appProvider, IEntityRoleAccessService entityRoleAccessService) { _context = context; _cacheService = cacheService; _userManager = userManager; _contextAccessor = contextAccessor; _pagesContext = pagesContext; _organizationService = organizationService; _appProvider = appProvider; _entityRoleAccessService = entityRoleAccessService; }
public AdministratorController( IUserContext userContext, IClientsService clientsService, IUserService userService, IDailyTaskManager dailyTaskManager) : base(userContext) { this.clientsService = clientsService; this.userService = userService; this.dailyTaskManager = dailyTaskManager; }
public CoursesService( ICoachesService coachesService, IClientsService clientsService, IDeletableEntityRepository <Course> coursesRepository, IDeletableEntityRepository <CourseClients> courseClientsRepository, ICloudinaryService cloudinaryService) { this.coachesService = coachesService; this.clientsService = clientsService; this.coursesRepository = coursesRepository; this.courseClientsRepository = courseClientsRepository; this.cloudinaryService = cloudinaryService; }
public ClientController( ICountriesService countries, ICitiesService cities, IClientsService clients, IMunicipalitiesService municipalities, IBanksService banks) { this.countries = countries; this.cities = cities; this.clients = clients; this.municipalities = municipalities; this.banks = banks; }
public BoardsController( IDepartmentsStructureService departmentsStructureService, IClientsService clientsService, IManagementService managementService, ITrackerClient trackerClient, IHostingEnvironment hostingEnvironment ) { _departmentsStructureService = departmentsStructureService; _clientsService = clientsService; _managementService = managementService; _trackerClient = trackerClient; _hostingEnvironment = hostingEnvironment; }
public RegisterModel( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, ICoachesService coachService, IClientsService clientService) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; _coachService = coachService; _clientService = clientService; }
private HttpClient SetUpClient(IClientsService clientsService) { var serverConfiguration = new WebHostBuilder() .UseStartup <Startup>() .ConfigureServices(services => { services.RemoveAll <IClientsService>(); services.TryAddTransient(_ => clientsService); }) .ConfigureTestServices(services => { services.RemoveAll <IClientsService>(); services.TryAddTransient(_ => clientsService); }); var testServer = new TestServer(serverConfiguration); return(testServer.CreateClient()); }
public void Init() { _service = new ClientsService(new MemoryRepository(), new TestEmailConfigMngr()); }
public ClientSitesController(IClientsService clientsService) { _clientsService = clientsService; }
public ClientsController(IQueryService queryService, IClientsService clientsService) { _queryService = queryService; _clientsService = clientsService; }
public ClientController(IClientsService clientServices) { _clientServices = clientServices; }
public ClientsController(IClientsService clientsService) { this.clientsService = clientsService; }