Exemplo n.º 1
0
 public PaymentController(IPaymentBusiness iPaymentBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus       = commandBus;
     this.queryBus         = queryBus;
     this.iPaymentBusiness = iPaymentBusiness ??
                             GsbIoC.Instance.GetInstance <IPaymentBusiness>();
 }
 public InventoryController(IInventoryBusiness iInventoryBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus         = commandBus;
     this.queryBus           = queryBus;
     this.iInventoryBusiness = iInventoryBusiness ??
                               GsbIoC.Instance.GetInstance <IInventoryBusiness>();
 }
Exemplo n.º 3
0
 public FilterPaneViewModel(
     IQueryBus queryBus,
     IFilterViewModelFactory factory)
 {
     _queryBus = queryBus;
     _factory  = factory;
 }
Exemplo n.º 4
0
 public ProfileController(IQueryBus queryBus, UserManager <User> userManager,
                          IUrlBuilder urlBuilder)
 {
     _queryBus    = queryBus;
     _userManager = userManager;
     _urlBuilder  = urlBuilder;
 }
Exemplo n.º 5
0
        public static async Task RunAsync(
            [BlobTrigger("spitball-files/study-room/{studyRoomId}/{studyRoomId2}_{sessionId}.mp4")] CloudBlockBlob blob, string studyRoomId2, string sessionId,
            [Inject] IVideoService videoService,
            [Inject] IQueryBus queryBus,
            [Queue(QueueName.BackgroundQueueName)] IAsyncCollector <string> queueCollector,
            ILogger log,
            CancellationToken token)
        {
            log.LogInformation($"Received blob {blob.Name}");
            await blob.FetchAttributesAsync();

            if (blob.Metadata.TryGetValue(MetaEncodingKey, out _))
            {
                log.LogInformation($"Sending email of blob {blob.Name}");
                var query  = new StudyRoomVideoEmailQuery($"{studyRoomId2}_{sessionId}");
                var result = await queryBus.QueryAsync(query, token);

                result.DownloadLink = blob.GetDownloadLink(TimeSpan.FromDays(365));

                var json = JsonConvert.SerializeObject(result, new JsonSerializerSettings
                {
                    TypeNameHandling = TypeNameHandling.All
                });
                await queueCollector.AddAsync(json, token);

                return;
            }
            log.LogInformation($"Processing video of blob {blob.Name}");

            var link = blob.GetDownloadLink(TimeSpan.FromHours(1));
            var v    = $"{studyRoomId2}{Separator}{sessionId}";
            await videoService.CreateStudyRoomSessionEncoding(v, link.AbsoluteUri, token);
        }
Exemplo n.º 6
0
 public CustomerController(ICustomerBusiness iCustomerBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus        = commandBus;
     this.queryBus          = queryBus;
     this.iCustomerBusiness = iCustomerBusiness ??
                              GsbIoC.Instance.GetInstance <ICustomerBusiness>();
 }
Exemplo n.º 7
0
        private static async Task <EmailObjectDto> GetEmail(string @event,
                                                            Language language, IQueryBus queryBus, CancellationToken token)
        {
            var query     = new GetEmailByEventQuery(@event);
            var template2 = await queryBus.QueryAsync(query, token);

            if (template2 == null)
            {
                return(null);
            }


            CultureInfo info         = language;
            var         emailObjects = template2.ToList();

            while (info != null)
            {
                var template1 = emailObjects.FirstOrDefault(f => f.CultureInfo.Equals(info));
                if (template1 != null)
                {
                    return(template1);
                }

                if (Equals(info, info.Parent))
                {
                    break;
                }
                info = info.Parent;
            }

            var z        = (CultureInfo)Language.English;
            var template = emailObjects.FirstOrDefault(f => f.CultureInfo.Equals(z));

            return(template);
        }
 public UnmutingExpiredMuteEventsService(IQueryBus queryBus, ICommandBus commandBus, UsersService usersService, UsersRolesService usersRolesService)
 {
     this._queryBus          = queryBus;
     this._commandBus        = commandBus;
     this._usersService      = usersService;
     this._usersRolesService = usersRolesService;
 }
Exemplo n.º 9
0
 public RentalController(IRentalBusiness iRentalBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus      = commandBus;
     this.queryBus        = queryBus;
     this.iRentalBusiness = iRentalBusiness ??
                            GsbIoC.Instance.GetInstance <IRentalBusiness>();
 }
Exemplo n.º 10
0
 public Net5TemplateHub(ILogger <Net5TemplateHub> logger, ICommandBus commandBus, IQueryBus queryBus)
     : base()
 {
     _logger     = logger;
     _commandBus = commandBus;
     _queryBus   = queryBus;
 }
Exemplo n.º 11
0
 public LanguageController(ILanguageBusiness iLanguageBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus        = commandBus;
     this.queryBus          = queryBus;
     this.iLanguageBusiness = iLanguageBusiness ??
                              GsbIoC.Instance.GetInstance <ILanguageBusiness>();
 }
Exemplo n.º 12
0
 public CourseController(ICommandBus commandBus, IQueryBus queryBus, lmsContext context, IUserResolver userResolver)
 {
     _commandBus   = commandBus;
     _queryBus     = queryBus;
     _context      = context;
     _userResolver = userResolver;
 }
Exemplo n.º 13
0
 public AuthenticationController(ICommandBus commandBus, IQueryBus queryBus,
                                 ILogger <AuthenticationController> logger, IJwtHandler jwtHandler, IEncrypter encrypter)
     : base(commandBus, queryBus, logger)
 {
     _jwtHandler = jwtHandler;
     _encrypter  = encrypter;
 }
 public PreGeneratedStatisticsGenerator(IQueryBus queryBus, StatisticsTimeService statisticsTimeService, StatisticsStorageService statisticsStorageService, StatisticsProcessingService statisticsProcessingService)
 {
     this.queryBus = queryBus;
     this._statisticsTimeService       = statisticsTimeService;
     this._statisticsStorageService    = statisticsStorageService;
     this._statisticsProcessingService = statisticsProcessingService;
 }
Exemplo n.º 15
0
 public CheckUserSafetyService(IQueryBus queryBus, UsersService usersService, DiscordServersService discordServersService, ConfigurationService configurationService)
 {
     ServerSafeUsers.UsersService = usersService;
     this._queryBus = queryBus;
     this._discordServersService = discordServersService;
     this._configurationService  = configurationService;
 }
            public Sut(IQueryBus queryBus, ICommandBus commandBus, ITrustedDomainHelper trustedDomainHelper, IDataProtectionProvider dataProtectionProvider, Fixture fixture)
                : base(queryBus, commandBus, trustedDomainHelper, dataProtectionProvider)
            {
                NullGuard.NotNull(fixture, nameof(fixture));

                _fixture = fixture;
            }
Exemplo n.º 17
0
 public RolesWithAccessToComplaintsChannelChangesHandler(IQueryBus queryBus, DiscordServersService discordServersService, UsersRolesService usersRolesService, ChannelsService channelsService)
 {
     this._discordServersService = discordServersService;
     this._usersRolesService     = usersRolesService;
     this._channelsService       = channelsService;
     this._queryBus = queryBus;
 }
Exemplo n.º 18
0
 public RequestTutorEmailOperation(ICommandBus commandBus, IUrlBuilder urlBuilder, IDataProtectionService dataProtectionService, IQueryBus queryBus)
 {
     _commandBus            = commandBus;
     _urlBuilder            = urlBuilder;
     _dataProtectionService = dataProtectionService;
     _queryBus = queryBus;
 }
Exemplo n.º 19
0
 public UserController(
     ICommandBus commandBus,
     IQueryBus queryBus)
 {
     _commandBus = commandBus;
     _queryBus   = queryBus;
 }
Exemplo n.º 20
0
 public InitializationService(IQueryBus queryBus, ICommandBus commandBus, MuteRoleInitService muteRoleInitService, ServerScanningService serverScanningService)
 {
     this._queryBus              = queryBus;
     this._commandBus            = commandBus;
     this._muteRoleInitService   = muteRoleInitService;
     this._serverScanningService = serverScanningService;
 }
Exemplo n.º 21
0
 public ShiftsController(
     IQueryBus queryBus,
     ICommandBus commandBus)
 {
     _queryBus   = queryBus;
     _commandBus = commandBus;
 }
Exemplo n.º 22
0
        //internal const string Profile = "profile";

        public AppClaimsPrincipalFactory(UserManager<User> userManager,
            //RoleManager<ApplicationRole> roleManager,
            IQueryBus queryBus,
            IOptions<IdentityOptions> options) :
            base(userManager, options)
        {
        }
Exemplo n.º 23
0
 public NotificationController(ICommandBus commandBus, IQueryBus queryBus, IHubContext <NotificationHub> notificationHub, IUserResolver userResolver)
 {
     _commandBus   = commandBus;
     _queryBus     = queryBus;
     _hubContext   = notificationHub;
     _userResolver = userResolver;
 }
Exemplo n.º 24
0
 public FilmActorController(IFilmActorBusiness iFilmActorBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus         = commandBus;
     this.queryBus           = queryBus;
     this.iFilmActorBusiness = iFilmActorBusiness ??
                               GsbIoC.Instance.GetInstance <IFilmActorBusiness>();
 }
Exemplo n.º 25
0
 public Assistant(IEventBus eventBus, ICommandBus commandBus, IQueryBus queryBus, ILogger <Assistant> logger)
 {
     _eventBus   = eventBus;
     _commandBus = commandBus;
     _queryBus   = queryBus;
     _logger     = logger;
 }
Exemplo n.º 26
0
 public PropertyPaneViewModel(
     IQueryBus queryBus,
     IProcess process)
 {
     _queryBus = queryBus;
     _process  = process;
 }
Exemplo n.º 27
0
 public HelpService(MessagesServiceFactory messagesServiceFactory, HelpMessageGeneratorService messageGeneratorService, ResponsesService responsesService, IQueryBus queryBus)
 {
     this._messagesServiceFactory = messagesServiceFactory;
     this._helpMessageGenerator   = messageGeneratorService;
     this._responsesService       = responsesService;
     this._queryBus = queryBus;
 }
Exemplo n.º 28
0
 public StaffController(IStaffBusiness iStaffBusiness = null, ICommandBus commandBus, IQueryBus queryBus)
 {
     this.commandBus     = commandBus;
     this.queryBus       = queryBus;
     this.iStaffBusiness = iStaffBusiness ??
                           GsbIoC.Instance.GetInstance <IStaffBusiness>();
 }
Exemplo n.º 29
0
        public CommonCRUDControllerBase()
        {
            var dr = DependencyResolver.Current;

            _repository = dr.GetService <IRepository <TEntity> >();
            _mapper     = dr.GetService <IMapper>();
            _queryBus   = dr.GetService <IQueryBus>();
        }
Exemplo n.º 30
0
 public InitializationService(IQueryBus queryBus, ICommandBus commandBus, MuteRoleInitService muteRoleInitService, ServerScanningService serverScanningService, CyclicStatisticsGeneratorService cyclicStatisticsGeneratorService)
 {
     this._queryBus                         = queryBus;
     this._commandBus                       = commandBus;
     this._muteRoleInitService              = muteRoleInitService;
     this._serverScanningService            = serverScanningService;
     this._cyclicStatisticsGeneratorService = cyclicStatisticsGeneratorService;
 }
Exemplo n.º 31
0
 public HubController(
     IClient client,
     IChatRoom room,
     ICommandBus commandBus,
     IQueryBus queryBus)
 {
     _client = client;
     _room = room;
     _commandBus = commandBus;
     _queryBus = queryBus;
 }
Exemplo n.º 32
0
        public UnitTest2()
        {
            CommandResultReposiotry commandResultReposiotry = new CommandResultReposiotry();
            CustomerRepository customerRepository = new CustomerRepository();
            CustomerCommandHandler customerCommandHandler = new CustomerCommandHandler(customerRepository, commandResultReposiotry);
            CommandResultQueryaHandler commandResultQueryaHandler = new CommandResultQueryaHandler(commandResultReposiotry);

            CommandBus commandBus = new CommandBus();
            commandBus.Registerd<CustomerCreateCommand>(customerCommandHandler);

            QueryBus queryBus = new QueryBus();
            queryBus.Registerd<CommandResultQuery>(commandResultQueryaHandler);

            _commandBus = commandBus;
            _queryBus = queryBus;
        }
Exemplo n.º 33
0
 public HomeController(IQueryBus queryBus, IAuthenticationWithoutPassword authentication)
 {
     _queryBus = queryBus;
     _authentication = authentication;
 }