Exemplo n.º 1
0
        public FitzyBot(IOptions <TwitchConfigurationOptions> options, ILoyaltyService loyaltyService)
        {
            this.options        = options;
            this.loyaltyService = loyaltyService;

            ConnectionCredentials credentials = new ConnectionCredentials(options.Value.TwitchUsername, options.Value.TwitchOAuth);
            var clientOptions = new ClientOptions
            {
                MessagesAllowedInPeriod = 750,
                ThrottlingPeriod        = TimeSpan.FromSeconds(30)
            };
            WebSocketClient customClient = new WebSocketClient(clientOptions);

            client = new TwitchClient(customClient);
            client.Initialize(credentials, options.Value.TwitchChannel);

            client.OnLog             += Client_OnLog;
            client.OnJoinedChannel   += Client_OnJoinedChannel;
            client.OnMessageReceived += Client_OnMessageReceived;
            client.OnWhisperReceived += Client_OnWhisperReceived;
            client.OnNewSubscriber   += Client_OnNewSubscriber;
            client.OnConnected       += Client_OnConnected;

            client.OnUserJoined += Client_OnUserJoined;
            client.OnUserLeft   += Client_OnUserLeft;
        }
Exemplo n.º 2
0
 public NotificationManager(
     ILoyaltyService loyaltyService,
     IHttpHandler httpHandler)
 {
     _loyaltyService = loyaltyService;
     _httpHandler    = httpHandler;
 }
Exemplo n.º 3
0
        public CheckoutService(
            IAddressBookService addressBookService,
            IOrderGroupFactory orderGroupFactory,
            IOrderGroupCalculator orderGroupCalculator,
            IPaymentProcessor paymentProcessor,
            IOrderRepository orderRepository,
            IContentRepository contentRepository,
            LocalizationService localizationService,
            IMailService mailService,
            IPromotionEngine promotionEngine,
            ILoyaltyService loyaltyService)
        {
            _addressBookService   = addressBookService;
            _orderGroupFactory    = orderGroupFactory;
            _orderGroupCalculator = orderGroupCalculator;
            _paymentProcessor     = paymentProcessor;
            _orderRepository      = orderRepository;
            _contentRepository    = contentRepository;
            _customerContext      = CustomerContext.Current;
            _localizationService  = localizationService;
            _mailService          = mailService;
            _promotionEngine      = promotionEngine;
            _loyaltyService       = loyaltyService;

            AuthenticatedPurchaseValidation = new AuthenticatedPurchaseValidation(_localizationService);
            AnonymousPurchaseValidation     = new AnonymousPurchaseValidation(_localizationService);
            CheckoutAddressHandling         = new CheckoutAddressHandling(_addressBookService);
        }
Exemplo n.º 4
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ITokenService tokenService,
     ApplicationUserDbContext dbContext,
     IMapper mapper,
     IRandomPasswordHelper randomPasswordHelper,
     IExternalAuthService <FacebookResponse> facebookService,
     IExternalAuthService <GoogleResponse> googleService,
     ILogger <AccountController> logger,
     IHostingEnvironment hostingEnvironment,
     IChallengeUserSyncService challengeUserSyncService,
     ILoyaltySyncService loyaltySyncService,
     ILoyaltyService loyaltyService,
     IGameUserSyncService gameUserSyncService,
     IImageService imageService,
     IStringLocalizer <AccountController> localizer)
 {
     _userManager              = userManager;
     _signInManager            = signInManager;
     _tokenService             = tokenService;
     _dbContext                = dbContext;
     _mapper                   = mapper;
     _randomPasswordHelper     = randomPasswordHelper;
     _facebookService          = facebookService;
     _googleService            = googleService;
     _logger                   = logger;
     _hostingEnvironment       = hostingEnvironment;
     _challengeUserSyncService = challengeUserSyncService;
     _loyaltySyncService       = loyaltySyncService;
     _loyaltyService           = loyaltyService;
     _gameUserSyncService      = gameUserSyncService;
     _imageService             = imageService;
     _localizer                = localizer;
 }
Exemplo n.º 5
0
 public LoyaltyController(ILoyaltyService loyaltyService,
                          IOptions <AppSettings> appSettings,
                          ILogger <LoyaltyController> log,
                          IAuditTrialService auditTrialService)
 {
     _loyaltyService    = loyaltyService;
     _appSettings       = appSettings.Value;
     _log               = log;
     _auditTrialService = auditTrialService;
 }
 public VariationController(CatalogEntryViewModelFactory viewModelFactory,
                            IReviewService reviewService,
                            IReviewActivityService reviewActivityService,
                            ICommerceTrackingService recommendationService,
                            ReferenceConverter referenceConverter,
                            IContentLoader contentLoader,
                            UrlResolver urlResolver,
                            ILoyaltyService loyaltyService) : base(referenceConverter, contentLoader, urlResolver, reviewService, reviewActivityService, recommendationService, loyaltyService)
 {
     _viewModelFactory = viewModelFactory;
 }
Exemplo n.º 7
0
 public LoyaltyController(
     ILoyaltyService loyaltyService,
     IIdentityService identityService,
     INotificationManager notificationManager,
     IMapper mapper)
 {
     _loyaltyService      = loyaltyService;
     _identityService     = identityService;
     _notificationManager = notificationManager;
     _mapper = mapper;
 }
Exemplo n.º 8
0
 public GameController(
     IIdentityService identityService,
     IGameManager gameManager,
     ILoyaltyService loyaltyService,
     IStringLocalizer <GameController> localizer,
     IContactService contactService)
 {
     _identityService = identityService;
     _gameManager     = gameManager;
     _loyaltyService  = loyaltyService;
     _localizer       = localizer;
     _contactService  = contactService;
 }
 public BundleController(IsInEditModeAccessor isInEditModeAccessor,
                         CatalogEntryViewModelFactory viewModelFactory,
                         IReviewService reviewService,
                         IReviewActivityService reviewActivityService,
                         ICommerceTrackingService recommendationService,
                         ReferenceConverter referenceConverter,
                         IContentLoader contentLoader,
                         UrlResolver urlResolver,
                         ILoyaltyService loyaltyService) : base(referenceConverter, contentLoader, urlResolver, reviewService, reviewActivityService, recommendationService, loyaltyService)
 {
     _isInEditMode     = isInEditModeAccessor();
     _viewModelFactory = viewModelFactory;
 }
 public CatalogContentControllerBase(ReferenceConverter referenceConverter,
                                     IContentLoader contentLoader,
                                     UrlResolver urlResolver,
                                     IReviewService reviewService,
                                     IReviewActivityService reviewActivityService,
                                     ICommerceTrackingService recommendationService,
                                     ILoyaltyService loyaltyService)
 {
     _referenceConverter    = referenceConverter;
     _contentLoader         = contentLoader;
     _urlResolver           = urlResolver;
     _reviewService         = reviewService;
     _reviewActivityService = reviewActivityService;
     _recommendationService = recommendationService;
     _loyaltyService        = loyaltyService;
 }
        public CatalogContentControllerBase(ReferenceConverter referenceConverter,
                                            IContentLoader contentLoader,
                                            UrlResolver urlResolver,
                                            IReviewService reviewService,
                                            IReviewActivityService reviewActivityService,
                                            ICommerceTrackingService recommendationService,
                                            ILoyaltyService loyaltyService)
        {
            var mode = HttpContext.RequestServices.GetRequiredService <IContextModeResolver>().CurrentMode;

            _isInEditMode          = mode == ContextMode.Edit || mode == ContextMode.Preview;
            _referenceConverter    = referenceConverter;
            _contentLoader         = contentLoader;
            _urlResolver           = urlResolver;
            _reviewService         = reviewService;
            _reviewActivityService = reviewActivityService;
            _recommendationService = recommendationService;
            _loyaltyService        = loyaltyService;
        }
Exemplo n.º 12
0
 public ConsumerService(IConsumerDAL consumerDAL, ILoyaltyService loyaltyService)
 {
     this.ConsumerDAL    = consumerDAL;
     this.LoyaltyService = loyaltyService;
 }
Exemplo n.º 13
0
 public LoyaltyApiController(ILogger <LoyaltyApiController> logger, IMapper mapper, ILoyaltyService loyaltyService)
 {
     this.Logger         = logger;
     this.LoyaltyService = loyaltyService;
     this.Mapper         = mapper;
 }
Exemplo n.º 14
0
 public ConsumerController(IConsumerService consumerService, ILoyaltyService loyaltyService)
 {
     ConsumerService = consumerService;
     LoyaltyService  = loyaltyService;
 }
Exemplo n.º 15
0
 public LoyaltyController(ILoyaltyService loyaltyService)
 {
     LoyaltyService = loyaltyService;
 }