Ejemplo n.º 1
0
        public InMemoryEventStore(string microserviceName, IUtcTimeProvider time, ITextSerializer serializer, IGuidProvider guid, ILogger log)
        {
            Ensure.NotNull(microserviceName, nameof(microserviceName));
            Ensure.NotNull(time, nameof(time));
            Ensure.NotNull(serializer, nameof(serializer));
            Ensure.NotNull(guid, nameof(guid));
            Ensure.NotNull(log, nameof(log));

            this.streamType = microserviceName;
            this.time       = time;
            this.serializer = serializer;
            this.guid       = guid;
            this.log        = log;
            this.cache      = new MemoryCache(microserviceName);

            /// TODO: could be replaced with a compiled lambda to make it more performant.
            var fromMementoConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(ISnapshot) });

            Ensure.CastIsValid(fromMementoConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IMemento)");
            this.originatorAggregateFactory = (id, memento) => (T)fromMementoConstructor.Invoke(new object[] { id, memento });

            var fromStreamConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(IEnumerable <IEvent>) });

            Ensure.CastIsValid(fromStreamConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IEnumerable<IEvent>)");
            this.aggregateFactory = (id, streamOfEvents) => (T)fromStreamConstructor.Invoke(new object[] { id, streamOfEvents });

            if (this.Events.Any(e => e.StreamType == this.streamType))
            {
                this.eventCollectionVersion = this.Events.Where(e => e.StreamType == this.streamType).Max(e => e.EventCollectionVersion);
            }
        }
Ejemplo n.º 2
0
 public AddWorkoutScheduleCommandHandler(
     IWorkoutSchedulesRepository workoutSchedulesRepository,
     IGuidProvider guidProvider)
 {
     _workoutSchedulesRepository = workoutSchedulesRepository;
     _guidProvider = guidProvider;
 }
 public NewGameCommandHandler(IDocumentStore documentStore, IGameGenerator gameGenerator, IPlayerMarksGenerator playerMarksGenerator, IGuidProvider guidProvider)
 {
     _documentStore        = documentStore ?? throw new ArgumentNullException(nameof(documentStore));
     _gameGenerator        = gameGenerator ?? throw new ArgumentNullException(nameof(gameGenerator));
     _playerMarksGenerator = playerMarksGenerator ?? throw new ArgumentNullException(nameof(playerMarksGenerator));
     _guidProvider         = guidProvider ?? throw new ArgumentNullException(nameof(guidProvider));
 }
Ejemplo n.º 4
0
        public OptimizedEventStore(string streamType, ITextSerializer serializer, string connectionString, IUtcTimeProvider time, IGuidProvider guid, ILogger log)
        {
            Ensure.NotNullNeitherEmtpyNorWhiteSpace(streamType, nameof(streamType));
            Ensure.NotNull(serializer, nameof(serializer));
            Ensure.NotNullNeitherEmtpyNorWhiteSpace(connectionString, nameof(connectionString));
            Ensure.NotNull(time, nameof(time));
            Ensure.NotNull(guid, nameof(guid));
            Ensure.NotNull(log, nameof(log));

            this.streamType       = streamType;
            this.serializer       = serializer;
            this.connectionString = connectionString;
            this.time             = time;
            this.guid             = guid;
            this.log   = log;
            this.cache = new MemoryCache(streamType);

            this.sql = new SqlClientLite(this.connectionString, timeoutInSeconds: 120);

            /// TODO: could be replaced with a compiled lambda to make it more performant.
            var fromMementoConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(ISnapshot) });

            Ensure.CastIsValid(fromMementoConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IMemento)");
            this.originatorAggregateFactory = (id, memento) => (T)fromMementoConstructor.Invoke(new object[] { id, memento });

            var fromStreamConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(IEnumerable <IEvent>) });

            Ensure.CastIsValid(fromStreamConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IEnumerable<IEvent>)");
            this.aggregateFactory = (id, streamOfEvents) => (T)fromStreamConstructor.Invoke(new object[] { id, streamOfEvents });

            this.eventCollectionVersion = this.GetLatestEventCollectionVersionFromDb();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueIntegrationImportCommandHandler"/> class.
        /// </summary>
        public QueueIntegrationImportCommandHandler(
            IDataContext dataContext,
            IFileInfoFactory fileInfoFactory,
            IQueryHandler <HashFileQuery, HashFileQueryResult> queryHandler,
            ICommandHandler <WriteFileFromStreamCommand, WriteFileFromStreamCommandResult> commandHandler,
            IPath path,
            IGuidProvider guidProvider,
            IDateTimeProvider dateTimeProvider,
            IOptions <IntegrationImportConfiguration> configuration)
        {
            _dataContext = dataContext;

            _fileInfoFactory = fileInfoFactory;

            _queryHandler = queryHandler;

            _commandHandler = commandHandler;

            _path = path;

            _guidProvider = guidProvider;

            _dateTimeProvider = dateTimeProvider;

            _configuration = configuration;
        }
Ejemplo n.º 6
0
        private bool ModelToObject(object source, Type resultType, out object result)
        {
            result = null;
            Type sourceType = source.GetType();

            if ((ReflectionHelper.Is <IIdProvider>(sourceType) || ReflectionHelper.Is <ICodeProvider>(sourceType) || ReflectionHelper.Is <IGuidProvider>(sourceType)) &&
                !this._coreManager.Contains(sourceType) &&
                this._coreManager.Contains(resultType))
            {
                if (source is IIdProvider)
                {
                    IIdProvider idProviderSource = source as IIdProvider;
                    result = this._coreManager.Get(idProviderSource.ID, resultType);
                    return(true);
                }
                else if (source is IGuidProvider)
                {
                    IGuidProvider guidProviderSource = source as IGuidProvider;
                    result = this._coreManager.Get(guidProviderSource.Guid, resultType);
                    return(true);
                }
                else if (source is ICodeProvider)
                {
                    ICodeProvider codeProviderSource = source as ICodeProvider;
                    result = this._coreManager.Get(codeProviderSource.Code, resultType);
                    return(true);
                }
            }

            return(false);
        }
        public AdoDotNetEventStore(string streamType, ITextSerializer serializer, string connectionString, IUtcTimeProvider time, IGuidProvider guid, ILogger log, bool persistIncomingPayloads, bool persistSnapshots, Func <string, ITextSerializer, string, bool> consumerFilter)
            : base(streamType)
        {
            Ensure.NotNull(serializer, nameof(serializer));
            Ensure.NotNullNeitherEmtpyNorWhiteSpace(connectionString, nameof(connectionString));
            Ensure.NotNull(time, nameof(time));
            Ensure.NotNull(guid, nameof(guid));
            Ensure.NotNull(log, nameof(log));

            this.serializer       = serializer;
            this.connectionString = connectionString;
            this.time             = time;
            this.guid             = guid;
            this.log            = log;
            this.consumerFilter = consumerFilter != null ? consumerFilter : EventStoreFuncs.DefaultFilter;
            this.cache          = new MemoryCache(streamType);

            this.sql = new SqlClientLite(this.connectionString, timeoutInSeconds: 120);

            /// TODO: could be replaced with a compiled lambda to make it more performant.
            var fromMementoConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(ISnapshot) });

            Ensure.CastIsValid(fromMementoConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IMemento)");
            this.originatorAggregateFactory = (id, memento) => (T)fromMementoConstructor.Invoke(new object[] { id, memento });

            var fromStreamConstructor = typeof(T).GetConstructor(new[] { typeof(Guid), typeof(IEnumerable <IEvent>) });

            Ensure.CastIsValid(fromStreamConstructor, "Type T must have a constructor with the following signature: .ctor(Guid, IEnumerable<IEvent>)");
            this.aggregateFactory = (id, streamOfEvents) => (T)fromStreamConstructor.Invoke(new object[] { id, streamOfEvents });

            this.eventCollectionVersion        = this.GetLatestEventCollectionVersionFromDb();
            this.CurrentEventCollectionVersion = this.eventCollectionVersion;

            if (persistIncomingPayloads)
            {
                this.addToInboxFactory = this.AddToInboxWithPayload;
            }
            else
            {
                this.addToInboxFactory = this.AddToInboxWithoutPayload;
            }

            // adding app subscription if missing
            var appSubCount = this.sql.ExecuteReaderFirstOrDefault(this.tryFindAppSubscription, r => r.GetInt32(0),
                                                                   new SqlParameter("@SubscriberStreamType", this.streamType),
                                                                   new SqlParameter("@StreamType", this.streamType + Constants.AppEventStreamNameSufix));

            if (appSubCount == 0)
            {
                var now = DateTime.Now;
                this.sql.ExecuteNonQuery(this.createAppSubscription,
                                         new SqlParameter("@SubscriberStreamType", this.streamType),
                                         new SqlParameter("@StreamType", this.streamType + Constants.AppEventStreamNameSufix),
                                         new SqlParameter("@CreationLocalTime", now),
                                         new SqlParameter("@UpdateLocalTime", now));
            }

            this.persistSnapshots = persistSnapshots;
        }
Ejemplo n.º 8
0
 public NewGameController(IUserContextDataProvider userContextDataProvider,
                          IGuidProvider guidProvider,
                          IMapper mapper)
     : base(userContextDataProvider)
 {
     this.guidProvider = guidProvider;
     this.mapper       = mapper;
 }
Ejemplo n.º 9
0
 public PosterUpdater(ILogger <PosterUpdater> log, YandexStorageService storage, IPosterReader reader, IPosterDbUpdater dbUpdater, IGuidProvider guidProvider)
 {
     _storage      = storage;
     _reader       = reader;
     _dbUpdater    = dbUpdater;
     _guidProvider = guidProvider;
     _log          = log;
 }
 public CreateWorkoutPlanCommandHandler(IWorkoutPlanRepository workoutPlanRepository,
                                        IDateTimeHelper dateTimeHelper,
                                        IGuidProvider guidProvider)
 {
     _workoutPlanRepository = workoutPlanRepository;
     _dateTimeHelper        = dateTimeHelper;
     _guidProvider          = guidProvider;
 }
Ejemplo n.º 11
0
        public static string GenerateToken(IGuidProvider guidProvider)
        {
            Span <byte> tokenBytes = stackalloc byte[16];

            guidProvider.NewGuid().TryWriteBytes(tokenBytes);

            return(Convert.ToBase64String(tokenBytes));
        }
 public ProjectFileDeserializationMessagesOutputFileNameProvider(
     IFileNameOperator fileNameOperator,
     IGuidProvider guidProvider,
     IStringlyTypedPathOperator stringlyTypedPathOperator)
 {
     this.FileNameOperator          = fileNameOperator;
     this.GuidProvider              = guidProvider;
     this.StringlyTypedPathOperator = stringlyTypedPathOperator;
 }
 public ApplicationReceiver(
     IGuidProvider guidProvider,
     IFromFormToApplicationAddDtoRequestMapper fromFormToApplicationAddDtoRequestMapper,
     ICommandBuilder <RegisterApplicationDto, RegisterApplicationCommand> commandBuilder)
 {
     _guidProvider = guidProvider;
     _fromFormToApplicationAddDtoRequestMapper = fromFormToApplicationAddDtoRequestMapper;
     _commandBuilder = commandBuilder;
 }
 public RequestReadModelRebuild(
     ISubscriber subscriber,
     IGuidProvider guidProvider,
     ICorrelationInitializer correlationInitializer)
 {
     _subscriber             = subscriber;
     _guidProvider           = guidProvider;
     _correlationInitializer = correlationInitializer;
 }
Ejemplo n.º 15
0
 public SettingsCreator(
     IPatternEngine patternEngine,
     IGuidProvider guidProvider,
     ILogger <SettingsCreator> logger)
 {
     this.patternEngine = CheckValue(patternEngine, nameof(patternEngine));
     this.guidProvider  = CheckValue(guidProvider, nameof(guidProvider));
     this.logger        = CheckValue(logger, nameof(logger));
 }
Ejemplo n.º 16
0
 public GetUserWorkoutQueryHandler(
     IGuidProvider guidProvider,
     IDateTimeProvider dateTimeProvider,
     IWorkoutExecutionRepository workoutExecutionRepository
     )
 {
     _dateTimeProvider           = dateTimeProvider;
     _guidProvider               = guidProvider;
     _workoutExecutionRepository = workoutExecutionRepository;
 }
Ejemplo n.º 17
0
 public PeopleService(IImageRepository imageRepository, IFilesDomainService filesService, IGuidProvider guid,
                      ILogger <PeopleService> logger, IMapper mapper, IPersonRepository peopleRepo)
 {
     this.imageRepository = imageRepository;
     this.filesService    = filesService;
     this.guid            = guid;
     this.logger          = logger;
     this.mapper          = mapper;
     this.peopleRepo      = peopleRepo;
 }
 public AddWorkoutExecutionCommandHandler(
     IGuidProvider guidProvider,
     IDateTimeProvider dateTimeProvider,
     IWorkoutExecutionRepository workoutExecutionRepository
     )
 {
     _dateTimeProvider           = dateTimeProvider;
     _guidProvider               = guidProvider;
     _workoutExecutionRepository = workoutExecutionRepository;
 }
Ejemplo n.º 19
0
 public EventFactory(IEventDataSerializationService eventDataSerializationService,
                     IGuidProvider guidProvider,
                     IEventTypeService eventTypeService,
                     IDateTimeProvider dateTimeProvider)
 {
     _eventDataSerializationService = eventDataSerializationService;
     _guidProvider     = guidProvider;
     _eventTypeService = eventTypeService;
     _dateTimeProvider = dateTimeProvider;
 }
Ejemplo n.º 20
0
 public CreateCategory(
     ICategoryRepository categoryRepository,
     IValidator <CreateCategoryHttpRequest> createCategoryRequestValidator,
     IGuidProvider guidProvider,
     IEventPublisher eventPublisher)
 {
     _categoryRepository             = categoryRepository;
     _createCategoryRequestValidator = createCategoryRequestValidator;
     _guidProvider   = guidProvider;
     _eventPublisher = eventPublisher;
 }
Ejemplo n.º 21
0
        public ApplicationService(IGuidProvider guid, ILogger log, string streamType, int eventsToPushMaxCount)
        {
            Ensure.NotNull(guid, nameof(guid));
            Ensure.NotNull(log, nameof(log));
            Ensure.NotNullNeitherEmtpyNorWhiteSpace(streamType, nameof(streamType));
            Ensure.Positive(eventsToPushMaxCount, "eventsToFlushMaxCount");

            this.guid                 = guid;
            this.log                  = log;
            this.streamType           = streamType;
            this.eventsToPushMaxCount = eventsToPushMaxCount;
        }
 public ApplicationReceiver(
     IGuidProvider guidProvider, 
     IFromFormToApplicationAddDtoRequestMapper fromFormToApplicationAddDtoRequestMapper,
     ICommandBuilder<RegisterApplicationDto, RegisterApplicationCommand> commandBuilder,
     ISubscriber subscriber,
     ICorrelationInitializer correlationInitializer)
 {
     _guidProvider = guidProvider;
     _fromFormToApplicationAddDtoRequestMapper = fromFormToApplicationAddDtoRequestMapper;
     _commandBuilder = commandBuilder;
     _subscriber = subscriber;
     _correlationInitializer = correlationInitializer;
 }
 public DeleteCategory(
     IEventPublisher eventPublisher,
     IEventStore <Core.Aggregates.Category> eventStore,
     IGuidProvider guidProvider,
     ISubscriber subscriber,
     ICorrelationInitializer correlationInitializer)
 {
     _eventPublisher         = eventPublisher;
     _eventStore             = eventStore;
     _guidProvider           = guidProvider;
     _subscriber             = subscriber;
     _correlationInitializer = correlationInitializer;
 }
Ejemplo n.º 24
0
 public EventPublisher(
     ILogger <EventPublisher> logger,
     IGuidProvider guidProvider,
     IDateTimeProvider dateTimeProvider,
     IOptions <EventOptions> eventOptionsAccessor,
     IEventGridClientFacade eventGridClientFacade)
 {
     _logger                      = logger;
     _guidProvider                = guidProvider;
     _dateTimeProvider            = dateTimeProvider;
     _eventGridClientFacade       = eventGridClientFacade;
     _eventOptions                = eventOptionsAccessor.Value;
     _lazyTopicNameInformationMap = new Lazy <IDictionary <string, EventInformation> >(GetTopicsMap);
 }
 public UpdateCategory(
     IValidator <UpdateCategoryCommand> updateCommandValidator,
     IEventPublisher eventPublisher,
     IEventStore <Core.Aggregates.Category> eventStore,
     IGuidProvider guidProvider,
     ISubscriber subscriber,
     ICorrelationInitializer correlationInitializer)
 {
     _eventPublisher         = eventPublisher;
     _eventStore             = eventStore;
     _guidProvider           = guidProvider;
     _subscriber             = subscriber;
     _correlationInitializer = correlationInitializer;
     _updateCommandValidator = updateCommandValidator;
 }
 public CreateCategory(
     IValidator <CreateCategoryHttpRequest> createCategoryRequestValidator,
     IGuidProvider guidProvider,
     IEventPublisher eventPublisher,
     IEventStore <Core.Aggregates.Category> eventStore,
     ISubscriber subscriber,
     ICorrelationInitializer correlationInitializer)
 {
     _createCategoryRequestValidator = createCategoryRequestValidator;
     _guidProvider           = guidProvider;
     _eventPublisher         = eventPublisher;
     _eventStore             = eventStore;
     _subscriber             = subscriber;
     _correlationInitializer = correlationInitializer;
 }
Ejemplo n.º 27
0
 public PriceUpdaterCron(
     IAppRepository appRepository,
     INotificationDispatcher notificationDispatcher,
     IPriceUpdaterConfigProvider configProvider,
     ILoopIdStore loopIdStore,
     IGuidProvider guidProvider,
     IAppPricesUpdater appPricesUpdater)
 {
     _appRepository          = appRepository;
     _notificationDispatcher = notificationDispatcher;
     _configProvider         = configProvider;
     _loopIdStore            = loopIdStore;
     _guidProvider           = guidProvider;
     _appPricesUpdater       = appPricesUpdater;
 }
Ejemplo n.º 28
0
        public ApiSecurityService(ICommandDispatcher commandDispatcher, IQueryDispatcher queryDispatcher, IGuidProvider guidProvider, IClock clock,
                                  IOptions <ApiSecurityOptions>?options, ILogger <ApiSecurityService>?logger)
        {
            _commandDispatcher = commandDispatcher ?? throw new ArgumentNullException(nameof(commandDispatcher));
            _queryDispatcher   = queryDispatcher ?? throw new ArgumentNullException(nameof(queryDispatcher));
            _guidProvider      = guidProvider ?? throw new ArgumentNullException(nameof(guidProvider));
            _clock             = clock ?? throw new ArgumentNullException(nameof(clock));
            _logger            = logger ?? (ILogger)NullLogger.Instance;

            var optionsValue = options?.Value;

            var jwtIssuerSigningKeyValue = optionsValue?.JwtIssuerSigningKey;

            SecurityKey jwtIssuerSigningKey;

            if (string.IsNullOrEmpty(jwtIssuerSigningKeyValue))
            {
                _logger.LogWarning($"{ApiSecurityOptions.DefaultSectionName}:{nameof(ApiSecurityOptions.JwtIssuerSigningKey)} was not configured. A temporary key is generated but be aware that the JWT tokens issued will not be accepted across multiple executions of the application.");
                jwtIssuerSigningKey = new RsaSecurityKey(RSAHelper.GenerateParameters());
            }
            else
            {
                jwtIssuerSigningKey = new RsaSecurityKey(RSAHelper.DeserializeParameters(jwtIssuerSigningKeyValue));
            }

            var jwtAccessTokenClockSkew = optionsValue?.JwtAccessTokenClockSkew ?? ApiSecurityOptions.DefaultJwtAccessTokenClockSkew;

            _jwtValidationParameters = new TokenValidationParameters()
            {
                IssuerSigningKey = jwtIssuerSigningKey,
                ValidAudience    = DefaultJwtAudience,
                ValidIssuer      = Program.ApplicationName,
                // When receiving a token, check that we've signed it.
                ValidateIssuerSigningKey = true,
                // When receiving a token, check that it is still valid.
                ValidateLifetime = true,
                // This defines the maximum allowable clock skew - i.e. provides a tolerance on the token expiry time
                // when validating the lifetime. As we're creating the tokens locally and validating them on the same
                // machines which should have synchronised time, this can be set to zero.
                ClockSkew = jwtAccessTokenClockSkew,
            };

            _jwtIssuerSigningCredentials   = new SigningCredentials(jwtIssuerSigningKey, SecurityAlgorithms.RsaSha256Signature);
            _jwtAccessTokenExpirationTime  = optionsValue?.JwtAccessTokenExpirationTime ?? ApiSecurityOptions.DefaultJwtAccessTokenExpirationTime;
            _jwtRefreshTokenExpirationTime = optionsValue?.JwtRefreshTokenExpirationTime ?? ApiSecurityOptions.DefaultJwtRefreshTokenExpirationTime;

            _jwtSecurityTokenHandler = new JwtSecurityTokenHandler();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="InstrumentationInterceptor" /> class.
        /// </summary>
        /// <param name="invocationCounter">The <see cref="MethodInvocationCounter"/> to use to
        /// count any interceptions.</param>
        /// <param name="invocationTimer">The <see cref="MethodInvocationTimer"/> to use to time any
        /// interceptions.</param>
        /// <param name="registrars">The <see cref="IRegistrar"/> any interceptions will register
        /// to.</param>
        /// <param name="guidProvider">The <see cref="IGuidProvider"/> to use to generate
        /// an interception id.</param>
        /// <exception cref="ArgumentNullException"><paramref name="invocationCounter"/>,
        /// <paramref name="invocationTimer"/>, <paramref name="registrars"/>, or
        /// <paramref name="guidProvider"/> is <see langword="null"/>.</exception>
        public InstrumentationInterceptor(
            MethodInvocationCounter invocationCounter,
            MethodInvocationTimer invocationTimer,
            IEnumerable <IRegistrar> registrars,
            IGuidProvider guidProvider)
        {
            ParameterValidation.IsNotNull(invocationCounter, nameof(invocationCounter));
            ParameterValidation.IsNotNull(invocationTimer, nameof(invocationTimer));
            ParameterValidation.IsNotNull(registrars, nameof(registrars));
            ParameterValidation.IsNotNull(guidProvider, nameof(guidProvider));

            this.invocationCounter = invocationCounter;
            this.invocationTimer   = invocationTimer;
            this.registrars        = registrars;
            this.guidProvider      = guidProvider;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConsoleInstrumentationReporter"/> class.
        /// </summary>
        /// <param name="invocationCounter">The <see cref="MethodInvocationCounter"/> to report on.
        /// </param>
        /// <param name="invocationTimer">The <see cref="MethodInvocationTimer"/> to report on.
        /// </param>
        /// <param name="dateTimeProvider">The <see cref="IDateTimeProvider"/> to use to
        /// provide the report time.</param>
        /// <param name="guidProvider">The <see cref="IGuidProvider"/> to use to generate a
        /// report id.</param>
        /// <exception cref="ArgumentNullException"><paramref name="invocationCounter"/>,
        /// <paramref name="invocationTimer"/>, <paramref name="dateTimeProvider"/>, or
        /// <paramref name="guidProvider"/> is <see langword="null"/>.</exception>
        public ConsoleInstrumentationReporter(
            MethodInvocationCounter invocationCounter,
            MethodInvocationTimer invocationTimer,
            IDateTimeProvider dateTimeProvider,
            IGuidProvider guidProvider)
        {
            ParameterValidation.IsNotNull(invocationCounter, nameof(invocationCounter));
            ParameterValidation.IsNotNull(invocationTimer, nameof(invocationTimer));
            ParameterValidation.IsNotNull(dateTimeProvider, nameof(dateTimeProvider));
            ParameterValidation.IsNotNull(guidProvider, nameof(guidProvider));

            this.invocationCounter = invocationCounter;
            this.invocationTimer   = invocationTimer;
            this.dateTimeProvider  = dateTimeProvider;
            this.guidProvider      = guidProvider;
        }
Ejemplo n.º 31
0
 public QuotationEngine(IDateTimeProvider dateTimeProvider, IGuidProvider guidProvider)
 {
     this.dateTimeProvider = dateTimeProvider;
     this.guidProvider = guidProvider;
     quotes = new ConcurrentDictionary<Guid, Quotation>();
 }