コード例 #1
0
 public AreasService(CookbookDbContext context, IMapper mapper,
                     IUserContextService userContextService, IAuthorizationService authorizationService,
                     IAreasRepository <Area> areasRepository)
     : base(context, mapper, userContextService, authorizationService)
 {
     _areasRepository = areasRepository;
 }
コード例 #2
0
 public ExchangeRatesController(IBankWorkerService bankWorkerService, IUserContextService userContextService, IExchangeRatesService exchangeRatesService, IBankService bankService)
 {
     _exchangeRatesService = exchangeRatesService ?? throw new ArgumentNullException(nameof(exchangeRatesService));
     _bankService          = bankService ?? throw new ArgumentNullException(nameof(bankService));
     _bankWorkerService    = bankWorkerService ?? throw new ArgumentNullException(nameof(bankWorkerService));
     _userContextService   = userContextService ?? throw new ArgumentNullException(nameof(userContextService));
 }
コード例 #3
0
 public BankWorkerController(ApplicationUserManager userManager, ICurrencyExchangeTicketsService ticketService, IUserContextService userContextService, IBankWorkerService bankWorkerService)
 {
     _bankWorkerService  = bankWorkerService ?? throw new ArgumentNullException(nameof(bankWorkerService));
     _userContextService = userContextService ?? throw new ArgumentNullException(nameof(userContextService));
     _ticketService      = ticketService ?? throw new ArgumentNullException(nameof(ticketService));
     _userManager        = userManager ?? throw new ArgumentNullException(nameof(userManager));
 }
コード例 #4
0
ファイル: NoteService.cs プロジェクト: mrutkowski2904/NetNote
 public NoteService(AppDbContext appDbContext, IMapper mapper, ILogger <NoteService> logger, IUserContextService userContextService)
 {
     this._appDbContext       = appDbContext;
     this._mapper             = mapper;
     this._logger             = logger;
     this._userContextService = userContextService;
 }
コード例 #5
0
 public AddNewTodoItemRequestHandler(ITodoRepository todoRepository, IUserRepository userRepository,
                                     IUserContextService userContextService)
 {
     _todoRepository     = todoRepository;
     _userRepository     = userRepository;
     _userContextService = userContextService;
 }
コード例 #6
0
 public CurrencyExchangeTicketController(IEmailSendingService emailSendingService, ICurrencyExchangeTicketsService ticketService, IUserContextService userContextService, ApplicationUserManager userManager)
 {
     _ticketService       = ticketService ?? throw new ArgumentNullException(nameof(ticketService));
     _userContextService  = userContextService ?? throw new ArgumentNullException(nameof(userContextService));
     _userManager         = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _emailSendingService = emailSendingService ?? throw new ArgumentNullException(nameof(emailSendingService));
 }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TelegramBotDevService"/> class.
        /// </summary>
        /// <param name="logger"><see cref="ILogger"/>.</param>
        /// <param name="config"><see cref="BotConfiguration"/>.</param>
        /// <param name="userContextService"><see cref="IUserContextService"/>.</param>
        /// <param name="scopeFactory"><see cref="IServiceScopeFactory"/>.</param>
        public TelegramBotDevService(
            ILogger <TelegramBotDevService> logger,
            BotConfiguration config,
            IUserContextService userContextService,
            IServiceScopeFactory scopeFactory)
        {
            this.logger             = logger;
            this.userContextService = userContextService;
            this.scopeFactory       = scopeFactory;

            if (config.Proxy != null)
            {
                this.Client = new TelegramBotClient(
                    config.Token,
                    new WebProxy(config.Proxy.Address, config.Proxy.Port)
                {
                    Credentials = new NetworkCredential(config.Proxy.Login, config.Proxy.Password),
                });
            }
            else
            {
                this.Client = new TelegramBotClient(config.Token);
            }

            var me = this.Client.GetMeAsync().Result;

            this.logger.LogInformation($"Bot {me.Id}-{me.FirstName} is active.");

            this.Client.StartReceiving(new DefaultUpdateHandler(this.HandleUpdateAsync, this.HandleErrorAsync));
        }
コード例 #8
0
 public RestaurantService(IMapper mapper, /*ILogger<RestaurantService> logger*/ IUserContextService userContextService, EfCoreRestaurantRepository efCoreRestaurantRepository)
 {
     _mapper = mapper;
     //_logger = logger;
     _userContextService         = userContextService;
     _efCoreRestaurantRepository = efCoreRestaurantRepository;
 }
コード例 #9
0
 public CategoriesService(CookbookDbContext context, IMapper mapper,
                          IUserContextService userContextService, IAuthorizationService authorizationService,
                          ICategoriesRepository <Category> categoriesRepository)
     : base(context, mapper, userContextService, authorizationService)
 {
     _categoriesRepository = categoriesRepository;
 }
コード例 #10
0
 public AddressService(HotChocolateDbContext context, AuthenticationSettings authenticationSettings, IMapper mapper, IUserContextService userContextService)
 {
     _context = context;
     _authenticationSettings = authenticationSettings;
     _mapper             = mapper;
     _userContextService = userContextService;
 }
コード例 #11
0
 public DocumentDbHandler(IDocumentStore documentStore, ICryptographicService cryptographicService, IUserContextService userContextService)
 {
     _documentStore = documentStore;
     _documentStore.SetSession("Users");
     _cryptographicService = cryptographicService;
     _userContextService   = userContextService;
 }
コード例 #12
0
 public IngredientsService(CookbookDbContext context, IMapper mapper,
                           IUserContextService userContextService, IAuthorizationService authorizationService,
                           IIngredientsRepository <Ingredient> ingredientsRepository)
     : base(context, mapper, userContextService, authorizationService)
 {
     _ingredientsRepository = ingredientsRepository;
 }
コード例 #13
0
 public RestaurantService(RestaurantDbContext dbContext, IMapper mapper, ILogger <RestaurantService> logger, IAuthorizationService authorizayionService, IUserContextService userContextService)
 {
     _dbContext            = dbContext;
     _mapper               = mapper;
     _logger               = logger;
     _authorizayionService = authorizayionService;
     _userContextService   = userContextService;
 }
コード例 #14
0
 public GetCurrentUserDetailsQueryHandler(
     IDomainRepository domainRepository,
     IUserContextService userContextService
     )
 {
     _domainRepository   = domainRepository;
     _userContextService = userContextService;
 }
コード例 #15
0
 public ExecutionContextFactory(
     IUserContextService userContextService,
     IDateTimeService dateTimeService
     )
 {
     _userContextService = userContextService;
     _dateTimeService    = dateTimeService;
 }
コード例 #16
0
 public CurrentUserProvider(
     IUserContextService userContextServiceService,
     IQueryExecutor queryExecutor
     )
 {
     UserContextServiceService = userContextServiceService;
     QueryExecutor             = queryExecutor;
 }
コード例 #17
0
 public HopContextBase(IUserContextService contextService,
                       IDateProvider dateProvider,
                       DbContextOptions options) : base(options)
 {
     DateProvider   = dateProvider;
     ContextService = contextService;
     Id             = Guid.NewGuid();
 }
コード例 #18
0
 public HopContextBase(IUserContextService contextService,
                       IDateProvider dateProvider) : base()
 {
     ContextService = contextService;
     DateProvider   = dateProvider;
     ContextService = contextService;
     Id             = Guid.NewGuid();
 }
コード例 #19
0
 public GetCurrentUserMicroSummaryQueryHandler(
     IDomainRepository domainRepository,
     IUserContextService userContextService
     )
 {
     _domainRepository   = domainRepository;
     _userContextService = userContextService;
 }
コード例 #20
0
 public DishService(RestaurantDbContext dbContext, IMapper mapper, IAuthorizationService authorizationService,
                    IUserContextService userContextService)
 {
     _dbContext            = dbContext;
     _mapper               = mapper;
     _authorizationService = authorizationService;
     _userContextService   = userContextService;
 }
コード例 #21
0
 public InMemoryUserWorkflowMappingService(
     IUserContextService userContext,
     UserWorkflowMappingsStore userWorkflowsStore
     )
 {
     _userContext        = userContext;
     _userWorkflowsStore = userWorkflowsStore;
 }
コード例 #22
0
 public InitStateRoutingStep(
     IUserContextService userContextService,
     ContentSettings contentSettings
     )
 {
     _userContextService = userContextService;
     _contentSettings    = contentSettings;
 }
コード例 #23
0
 public InitUserContextRoutingStep(
     IUserContextService userContextService,
     IExecutionContextFactory executionContextFactory
     )
 {
     _userContextService      = userContextService;
     _executionContextFactory = executionContextFactory;
 }
コード例 #24
0
 public PermissionAuthorizationHandler(
     IUserContextService userContextService,
     IInternalRoleRepository internalRoleRepository
     )
 {
     _userContextService     = userContextService;
     _internalRoleRepository = internalRoleRepository;
 }
コード例 #25
0
 public CurrentUserViewHelper(
     IUserContextService userContextServiceService,
     IQueryExecutor queryExecutor
     )
 {
     _userContextService = userContextServiceService;
     _queryExecutor      = queryExecutor;
 }
コード例 #26
0
 public AccountService(HotChocolateDbContext context, IPasswordHasher <User> passwordHasher, AuthenticationSettings authenticationSettings, IMapper mapper, IUserContextService userContextService)
 {
     _context                = context;
     _passwordHasher         = passwordHasher;
     _authenticationSettings = authenticationSettings;
     _mapper             = mapper;
     _userContextService = userContextService;
 }
コード例 #27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TaskResultsController"/> class.
        /// </summary>
        /// <param name="candidateExercisesResultsServise">A candidate exercise servise.</param>
        /// <param name="service">A candidate task evaluation service.</param>
        /// <param name="userContextService">A user context service.</param>
        public TaskResultsController(ICandidateExercisesResultsService candidateExercisesResultsServise, ICandidateTaskEvaluationService service, IUserContextService userContextService)
        {
            _exercisesResultsServise = candidateExercisesResultsServise ?? throw new ArgumentNullException(nameof(candidateExercisesResultsServise));

            _taskEvaluationServise = service ?? throw new ArgumentNullException(nameof(service));

            _userContextService = userContextService ?? throw new ArgumentNullException(nameof(userContextService));
        }
コード例 #28
0
 public HolidayApprovalWorkflow(
     ILoggerFactory loggerFactory,
     IUserContextService userContextService
     )
 {
     this._logger             = loggerFactory.CreateLogger <HolidayApprovalWorkflow>();
     this._userContextService = userContextService;
 }
コード例 #29
0
 public ApplicationService(IGroupDataContextFactory groupDataContextFactory, RequestContext requestContext,
                           IUserContextService webUserContextService, ISystemDataContext systemDataContext)
 {
     _groupDataContextFactory = groupDataContextFactory;
     _requestContext          = requestContext;
     _webUserContextService   = webUserContextService;
     _systemDataContext       = systemDataContext;
 }
コード例 #30
0
 public CategoryService(AppDbContext dbContext, IMapper mapper, ILogger <CategoryService> logger, IAuthorizationService authorizationService, IUserContextService userContextService)
 {
     this._dbContext            = dbContext;
     this._mapper               = mapper;
     this._logger               = logger;
     this._authorizationService = authorizationService;
     this._userContextService   = userContextService;
 }