public SendMessageInConversationCommandHandler(IAsyncDocumentSession session, RavenDBIdUtil ravenDbIdUtil, IMediator mediator, INow now)
 {
     _session       = session;
     _ravenDbIdUtil = ravenDbIdUtil;
     this.mediator  = mediator;
     this.now       = now;
 }
 public LogService(LogsDatabaseContext context, INow now, IConfiguration helper, IMapper mapper)
 {
     _context = context;
     _now     = now;
     _helper  = helper;
     _mapper  = mapper;
 }
Example #3
0
 public TempTokenProvider(INow now, ILogger logger)
 {
     Now        = now;
     Logger     = logger;
     key        = WebConfigurationManager.AppSettings["CryptKey"]?.ToString();
     ExpireTime = 15;    // seconds
 }
Example #4
0
 public JobCreator(
     IScheduler scheduler,
     INow now)
 {
     _scheduler = scheduler;
     _now       = now;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Daemon" /> class.
 /// </summary>
 public Daemon(ILogger <Daemon> logger, IMessageHandling messageHandling, INow now, IGuid guid, IDbContexts dbContexts)
 {
     _logger          = logger;
     _messageHandling = messageHandling;
     _guid            = guid;
     _now             = now;
     _dbContexts      = dbContexts;
 }
        public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config, INow time)
        {
            myTimeReference = time;
            myConfig        = config;

            Alarms             = ParseConfig();
            LastAlarmTriggered = myTimeReference.Now();
        }
Example #7
0
 public TossCreateCommandHandler(IAsyncDocumentSession session, IStripeClient stripeClient, IMediator mediator, INow now, IHttpContextAccessor httpContextAccessor)
 {
     _session                 = session;
     this.stripeClient        = stripeClient;
     this.mediator            = mediator;
     this.now                 = now;
     this.httpContextAccessor = httpContextAccessor;
 }
        public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config, INow time)
        {
            myTimeReference = time;
            myConfig = config;

            Alarms = ParseConfig();
            LastAlarmTriggered = myTimeReference.Now();
        }
 public TossCreateCommandHandler(IAsyncDocumentSession session, IHttpContextAccessor httpContextAccessor, IStripeClient stripeClient, UserManager <ApplicationUser> userManager,
                                 IMediator mediator, INow now)
 {
     this.mediator        = mediator;
     this.now             = now;
     _session             = session;
     _httpContextAccessor = httpContextAccessor;
     this.stripeClient    = stripeClient;
     this.userManager     = userManager;
 }
Example #10
0
 public UserService(UserManager <ApplicationUser, Guid> applicationUserManager, IMapper mapper,
                    IImageProcessorService imageProcessorService, INow now, DatabaseContext context, IImageService imageService)
 {
     _applicationUserManager = applicationUserManager;
     _mapper = mapper;
     _imageProcessorService = imageProcessorService;
     _now          = now;
     _context      = context;
     _imageService = imageService;
 }
Example #11
0
 internal ServerCountSampleRecorder(
     IKeyValueStore store,
     State state,
     StateMaintainer stateMaintainer,
     INow now)
 {
     _store           = store;
     _state           = state;
     _stateMaintainer = stateMaintainer;
     _now             = now;
 }
Example #12
0
 public SimpleTracer(INow now, IHelper helper)
 {
     _now    = now;
     _helper = helper;
     using (new TimingOutLock(_thisLock))
     {
         _steps = new ConcurrentList <TraceStep>();
         _index = new AtomicInteger(0);
         _index.Increment();
     }
 }
 public SynchronizedFilesRepository(
     IFileTranscoder fileTranscoder,
     MusicMirrorConfiguration configuration,
     INow now)
 {
     if (now == null) throw new ArgumentNullException(nameof(now), $"{nameof(now)} is null.");
     if (fileTranscoder == null) throw new ArgumentNullException(nameof(fileTranscoder));
     if (configuration == null) throw new ArgumentNullException(nameof(configuration));
     _fileTranscoder = fileTranscoder;
     _configuration = configuration;
     _now = now;
     _synchronizations = new ConcurrentDictionary<string, DateTimeOffset>();
 }
Example #14
0
        public Form1()
        {
            this.excel            = new Microsoft.Office.Interop.Excel.Application();
            this.questionBuilders = new Dictionary <string, IQuestionsBuilder>
            {
                { "XPlus10Button", DuckBillContainer.Get <IXPlus10QuestionBuilder>() },
                { "XPlus9Button", DuckBillContainer.Get <IXPlus9QuestionBuilder>() },
                { "XPlus8Button", DuckBillContainer.Get <IXPlus8QuestionBuilder>() },
                { "XPlus7Button", DuckBillContainer.Get <IXPlus7QuestionBuilder>() },
                { "XPlus6Button", DuckBillContainer.Get <IXPlus6QuestionBuilder>() },
                { "XPlus5Button", DuckBillContainer.Get <IXPlus5QuestionBuilder>() },
                { "XPlusYButton", DuckBillContainer.Get <IXPlusYQuestionsBuilder>() },
                { "XaPlusYNotCarryButton", DuckBillContainer.Get <IXaPlusYNotCarryQuestionsBuilder>() },
                { "XaPlusYbNotCarryButton", DuckBillContainer.Get <IXaPlusYbNotCarryQuestionsBuilder>() },
                { "XaPlusYCarryButton", DuckBillContainer.Get <IXaPlusYCarryQuestionsBuilder>() },
                {
                    "XaPlusYbCarryAndLessThen100Button",
                    DuckBillContainer.Get <IXaPlusYbCarryAndLessThen100QuestionsBuilder>()
                },
                { "XPlusYLessThen100Button", DuckBillContainer.Get <IXPlusYLessThen100QuestionsBuilder>() },
                { "XSubtraction3Button", DuckBillContainer.Get <IXSubtraction3QuestionBuilder>() },
                { "XSubtraction4Button", DuckBillContainer.Get <IXSubtraction4QuestionBuilder>() },
                { "XSubtraction5Button", DuckBillContainer.Get <IXSubtraction5QuestionBuilder>() },
                { "X0PlusY0Button", DuckBillContainer.Get <IX0PlusY0QuestionsBuilder>() },
                { "TenSubtractionXButton", DuckBillContainer.Get <ITenSubtractionXQuestionBuilder>() },
                { "XPlusYEqualsTenButton", DuckBillContainer.Get <IXPlusYEqualsTenQuestionBuilder>() },
                { "XSubtractionYLessThan10Button", DuckBillContainer.Get <IXSubtractionYLessThan10QuestionBuilder>() },
                { "XaSubractionYWithNoBackButton", DuckBillContainer.Get <IXaSubractionYWithNoBackQuestionBuilder>() },
                { "XaSubtractionX0Button", DuckBillContainer.Get <IXaSubtractionX0QuestionBuilder>() },
                { "XaSubtractionY0Button", DuckBillContainer.Get <IXaSubtractionY0QuestionBuilder>() },
                { "XaSubtractionYbWithNoBackButton", DuckBillContainer.Get <IXaSubtractionYbWithNoBackQuestionBuilder>() },
                { "OneXSubtractionYWithBackButton", DuckBillContainer.Get <IOneXSubtractionYWithBackQuestionBuilder>() },
                { "XaSubtractionYWithBackButton", DuckBillContainer.Get <IXaSubtractionYWithBackQuestionBuilder>() },
                { "XaSubtractionYbWithBackButton", DuckBillContainer.Get <IXaSubtractionYbWithBackQuestionBuilder>() },
                { "XSubtractionYLessThan100Button", DuckBillContainer.Get <IXSubtractionYLessThan100QuestionBuilder>() },
                { "ElevenMixButton", DuckBillContainer.Get <IElevenMixQuestionBuilder>() },
                { "TwelveMixButton", DuckBillContainer.Get <ITweleveQuestionBuilder>() },
                { "ThirteenMixButton", DuckBillContainer.Get <IThirteenQuestionBuilder>() },
                { "FourteenMixButton", DuckBillContainer.Get <IFourteenQuestionBuilder>() },
                { "FifteenMixButton", DuckBillContainer.Get <IFifteenQuestionBuilder>() },
                { "SixteenMixButton", DuckBillContainer.Get <ISixteenQuestionBuilder>() },
                { "SeventeenMixButton", DuckBillContainer.Get <ISevenTeenQuestionBuilder>() },
                { "EighteenMixButton", DuckBillContainer.Get <IEightteenQuestionBuilder>() },
                { "Include20CarryOverMixButton", DuckBillContainer.Get <IInclude20AddAndSubtractionCarryOverMixQuestionBuilder>() }
            };


            this.worksheetBuilder = DuckBillContainer.Get <IWorksheetBuilder>();
            this.now = DuckBillContainer.Get <INow>();
            InitializeComponent();
        }
            public TestContext()
            {
                _fixture = new Fixture().Customize(new AutoRhinoMockCustomization());

                _scheduleId  = _fixture.Create <Guid>();
                _jobId       = _fixture.Create <Guid>();
                _description = _fixture.Create <string>();
                _startUtc    = _fixture.Create <DateTime>();
                _cron        = "* * * ? * *";
                _endUtc      = _startUtc.Add(_fixture.Create <TimeSpan>());

                _scheduler = _fixture.Freeze <IScheduler>();
                _now       = _fixture.Freeze <INow>();
                _sut       = _fixture.Create <JobScheduler>();
            }
Example #16
0
 public CacheService(
     ICacheEntryRepository cacheEntryRepository,
     INow now)
 {
     if (now == null)
     {
         throw new ArgumentNullException(nameof(now), $"{nameof(now)} is null.");
     }
     if (cacheEntryRepository == null)
     {
         throw new ArgumentNullException(nameof(cacheEntryRepository));
     }
     _cacheEntryRepository = cacheEntryRepository;
     _now = now;
 }
Example #17
0
            public TestContext()
            {
                _fixture = new Fixture().Customize(new AutoRhinoMockCustomization());

                _jobId       = _fixture.Create <Guid>();
                _description = _fixture.Create <string>();
                _callbackUrl = _fixture.Create <string>();
                _httpVerb    = _fixture.Create <string>();
                _payload     = _fixture.Create <string>();
                _contentType = _fixture.Create <string>();
                _headers     = _fixture.Create <string>();

                _scheduler = _fixture.Freeze <IScheduler>();
                _now       = _fixture.Freeze <INow>();
                _sut       = _fixture.Create <JobCreator>();
            }
Example #18
0
        private void Init(INow now, CacheConfig config)
        {
            this.now  = now ?? new DateTimeNow();
            this.Name = this.GetType().FullName;

            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            _config = config;

            if (string.IsNullOrEmpty(_config.Name))
            {
                throw new ArgumentNullException("CacheConfig.Name");
            }
        }
Example #19
0
 public HomeController(INow now)
 {
     _now = now;
 }
Example #20
0
 public ApiEntryHandler(ITracingContext context, INow now, IHelper helper)
 {
     _context = context;
     _now     = now;
     _helper  = helper;
 }
Example #21
0
 public ParsianPaymentProvider(ParsianBankConfig config, INow now)
     : base(config, now, "Parsian")
 {
 }
 protected BaseShetabPaymentProvider(ShetabBankConfig config, INow now, string type)
 {
     this._config      = config;
     this.ProviderType = type;
     Now = now;
 }
Example #23
0
 public ProtocolUdpNetwork(IUdpProtocol protocol, INow now, int timeout)
 {
     _protocol = protocol;
     _now      = now;
     _timeout  = timeout;
 }
Example #24
0
 public BestTagsQueryHandler(IAsyncDocumentSession session, INow now)
 {
     _session = session;
     _now     = now;
 }
Example #25
0
 public PaymentProviderBeginPaymentResponse(INow now)
 {
     SendData = new Dictionary <string, string>(StringComparer.CurrentCultureIgnoreCase);
     Date     = now.Value;
 }
Example #26
0
 public PaymentProviderReversalPaymentResponse(INow now)
 {
     Date = now.Value;
 }
Example #27
0
 public HttpCacheManager(INow now, HttpContextBase context, CacheConfig config)
     : base(now, config)
 {
     Init(context);
 }
Example #28
0
 public LogsController(ITracingContext context, INow now)
 {
     _context = context;
     _now     = now;
 }
 public SamanPaymentProvider(SamanBankConfig config, INow now)
     : base(config, now, "Saman")
 {
 }
Example #30
0
 public ServerCommander(IServerCommandCommunication cmd, IConfiguration conf, INow now)
 {
     _cmd  = cmd;
     _conf = conf;
     _now  = now;
 }
 public AyandehPaymentProvider(AyandehBankConfig config, INow now)
     : base(config, now, "Ayandeh")
 {
 }
 public PaymentProviderEndPaymentResponse(INow now)
 {
     Date = now.Value;
 }