/// <summary> /// Initializes a new instance of the <see cref="FeedMessageMapper" /> class /// </summary> /// <param name="sportEntityFactory">A <see cref="ISportEntityFactory"/> implementation used to construct <see cref="ISportEvent"/> instances</param> /// <param name="nameProviderFactory">A <see cref="INameProviderFactory"/> instance used build <see cref="INameProvider"/> instances used to get/create market/outcome names</param> /// <param name="mappingProviderFactory">A factory used to construct <see cref="IMarketMappingProvider"/> instances</param> /// <param name="namedValuesProvider">A <see cref="INamedValuesProvider"/> used to obtain descriptions for named values</param> /// <param name="externalExceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> enum member specifying how the publicly available instance constructed by current instance should handle potential exceptions</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> /// <param name="marketCacheProvider">The SDK market cache provider used to retrieve market data</param> /// <param name="voidReasonCache">A <see cref="INamedValueCache"/> for possible void reasons</param> public FeedMessageMapper(ISportEntityFactory sportEntityFactory, INameProviderFactory nameProviderFactory, IMarketMappingProviderFactory mappingProviderFactory, INamedValuesProvider namedValuesProvider, ExceptionHandlingStrategy externalExceptionStrategy, IProducerManager producerManager, IMarketCacheProvider marketCacheProvider, INamedValueCache voidReasonCache) { Guard.Argument(sportEntityFactory, nameof(sportEntityFactory)).NotNull(); Guard.Argument(nameProviderFactory, nameof(nameProviderFactory)).NotNull(); Guard.Argument(namedValuesProvider, nameof(namedValuesProvider)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(voidReasonCache, nameof(voidReasonCache)).NotNull(); _nameProviderFactory = nameProviderFactory; _sportEntityFactory = sportEntityFactory; _mappingProviderFactory = mappingProviderFactory; _namedValuesProvider = namedValuesProvider; _externalExceptionStrategy = externalExceptionStrategy; _producerManager = producerManager; _marketCacheProvider = marketCacheProvider; _voidReasonCache = voidReasonCache; }
/// <summary> /// Initializes a new instance of the <see cref="NameProvider" /> class /// </summary> /// <param name="marketCacheProvider">A <see cref="IMarketCacheProvider" /> instance used to retrieve market descriptors</param> /// <param name="eventStatusCache">A <see cref="ISportEventStatusCache" /> instance used to retrieve event status data</param> /// <param name="sportEvent">A <see cref="ISportEvent" /> instance representing associated sport @event</param> /// <param name="marketId">A market identifier of the market associated with the constructed instance</param> /// <param name="specifiers"> /// A <see cref="IReadOnlyDictionary{String, String}" /> representing specifiers of the associated /// market /// </param> /// <param name="producer">An <see cref="IProducer" /> used to get market/outcome mappings</param> /// <param name="sportId">A sportId used to get market/outcome mappings</param> /// <param name="exceptionStrategy"> /// A <see cref="ExceptionHandlingStrategy" /> describing the mode in which the SDK is /// running /// </param> /// <param name="producerManager">The <see cref="IProducerManager" /> used get available <see cref="IProducer" /></param> internal MarketMappingProvider(IMarketCacheProvider marketCacheProvider, ISportEventStatusCache eventStatusCache, ISportEvent sportEvent, int marketId, IReadOnlyDictionary <string, string> specifiers, IProducer producer, URN sportId, ExceptionHandlingStrategy exceptionStrategy, IProducerManager producerManager) { Contract.Requires(marketCacheProvider != null); Contract.Requires(sportEvent != null); Contract.Requires(eventStatusCache != null); Contract.Requires(producerManager != null); _marketCacheProvider = marketCacheProvider; _eventStatusCache = eventStatusCache; _sportEvent = sportEvent; _marketId = marketId; _specifiers = specifiers; _exceptionStrategy = exceptionStrategy; _producerManager = producerManager; _producer = producer; _sportId = sportId; }
/// <summary> /// Initializes a new instance of the <see cref="FeedMessageMapper" /> class /// </summary> /// <param name="sportEntityFactory">A <see cref="ISportEntityFactory"/> implementation used to construct <see cref="ISportEvent"/> instances</param> /// <param name="nameProviderFactory">A <see cref="INameProviderFactory"/> instance used build <see cref="INameProvider"/> instances used to get/create market/outcome names</param> /// <param name="mappingProviderFactory">A factory used to construct <see cref="IMarketMappingProvider"/> instances</param> /// <param name="namedValuesProvider">A <see cref="INamedValuesProvider"/> used to obtain descriptions for named values</param> /// <param name="externalExceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> enum member specifying how the publicly available instance constructed by current instance should handle potential exceptions</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> /// <param name="marketCacheProvider">The SDK market cache provider used to retrieve market data</param> /// <param name="voidReasonCache">A <see cref="INamedValueCache"/> for possible void reasons</param> public FeedMessageMapper(ISportEntityFactory sportEntityFactory, INameProviderFactory nameProviderFactory, IMarketMappingProviderFactory mappingProviderFactory, INamedValuesProvider namedValuesProvider, ExceptionHandlingStrategy externalExceptionStrategy, IProducerManager producerManager, IMarketCacheProvider marketCacheProvider, INamedValueCache voidReasonCache) { Contract.Requires(sportEntityFactory != null); Contract.Requires(nameProviderFactory != null); Contract.Requires(namedValuesProvider != null); Contract.Requires(producerManager != null); Contract.Requires(marketCacheProvider != null); Contract.Requires(voidReasonCache != null); _nameProviderFactory = nameProviderFactory; _sportEntityFactory = sportEntityFactory; _mappingProviderFactory = mappingProviderFactory; _namedValuesProvider = namedValuesProvider; _externalExceptionStrategy = externalExceptionStrategy; _producerManager = producerManager; _marketCacheProvider = marketCacheProvider; _voidReasonCache = voidReasonCache; }
/// <summary> /// Initializes a new instance of the <see cref="NameProvider"/> class /// </summary> /// <param name="marketCacheProvider">A <see cref="IMarketCacheProvider"/> instance used to retrieve market descriptors</param> /// <param name="eventStatusCache">A <see cref="ISportEventStatusCache"/> instance used to retrieve event status data</param> /// <param name="sportEvent">A <see cref="ISportEvent"/> instance representing associated sport @event</param> /// <param name="marketId">A market identifier of the market associated with the constructed instance</param> /// <param name="specifiers">A <see cref="IReadOnlyDictionary{String, String}"/> representing specifiers of the associated market</param> /// <param name="producer">An <see cref="IProducer"/> used to get market/outcome mappings</param> /// <param name="sportId">A sportId used to get market/outcome mappings</param> /// <param name="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> describing the mode in which the SDK is running</param> /// <param name="producerManager">The <see cref="IProducerManager"/> used get available <see cref="IProducer"/></param> internal MarketMappingProvider(IMarketCacheProvider marketCacheProvider, ISportEventStatusCache eventStatusCache, ISportEvent sportEvent, int marketId, IReadOnlyDictionary <string, string> specifiers, IProducer producer, URN sportId, ExceptionHandlingStrategy exceptionStrategy, IProducerManager producerManager) { Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(sportEvent, nameof(sportEvent)).NotNull(); Guard.Argument(eventStatusCache, nameof(eventStatusCache)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); _marketCacheProvider = marketCacheProvider; _eventStatusCache = eventStatusCache; _sportEvent = sportEvent; _marketId = marketId; _specifiers = specifiers; _exceptionStrategy = exceptionStrategy; _producerManager = producerManager; _producer = producer; _sportId = sportId; }
/// <summary> /// Initializes a new instance of the <see cref="NameProviderFactory"/> class. /// </summary> /// <param name="marketCacheProvider">A <see cref="IMarketCacheProvider"/> instance used to retrieve market descriptors</param> /// <param name="eventStatusCache">A <see cref="ISportEventStatusCache"/> instance used to retrieve event status data</param> /// <param name="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> specifying how to handle potential exceptions thrown to the user code</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> public MarketMappingProviderFactory(IMarketCacheProvider marketCacheProvider, ISportEventStatusCache eventStatusCache, ExceptionHandlingStrategy exceptionStrategy, IProducerManager producerManager) { Contract.Requires(marketCacheProvider != null); Contract.Requires(eventStatusCache != null); Contract.Requires(producerManager != null); _marketCacheProvider = marketCacheProvider; _eventStatusCache = eventStatusCache; _exceptionStrategy = exceptionStrategy; _producerManager = producerManager; }
/// <summary> /// Initializes a new instance of the <see cref="NameProviderFactory"/> class. /// </summary> /// <param name="marketCacheProvider">A <see cref="IMarketCacheProvider"/> instance used to retrieve market descriptors</param> /// <param name="eventStatusCache">A <see cref="ISportEventStatusCache"/> instance used to retrieve event status data</param> /// <param name="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> specifying how to handle potential exceptions thrown to the user code</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> public MarketMappingProviderFactory(IMarketCacheProvider marketCacheProvider, ISportEventStatusCache eventStatusCache, ExceptionHandlingStrategy exceptionStrategy, IProducerManager producerManager) { Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(eventStatusCache, nameof(eventStatusCache)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); _marketCacheProvider = marketCacheProvider; _eventStatusCache = eventStatusCache; _exceptionStrategy = exceptionStrategy; _producerManager = producerManager; }
/// <summary> /// Initializes a new instance of the <see cref="RabbitMqMessageReceiver"/> class /// </summary> /// <param name="channel">A <see cref="IRabbitMqChannel"/> representing a channel to the RabbitMQ broker</param> /// <param name="deserializer">A <see cref="IDeserializer{T}"/> instance used for de-serialization of messages received from the feed</param> /// <param name="keyParser">A <see cref="IRoutingKeyParser"/> used to parse the rabbit's routing key</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> public RabbitMqMessageReceiver(IRabbitMqChannel channel, IDeserializer <FeedMessage> deserializer, IRoutingKeyParser keyParser, IProducerManager producerManager) { Contract.Requires(channel != null); Contract.Requires(deserializer != null); Contract.Requires(keyParser != null); Contract.Requires(producerManager != null); _channel = channel; _deserializer = deserializer; _keyParser = keyParser; _producerManager = producerManager; }
/// <summary> /// Initializes a new instance of the <see cref="RabbitMqMessageReceiver"/> class /// </summary> /// <param name="channel">A <see cref="IRabbitMqChannel"/> representing a channel to the RabbitMQ broker</param> /// <param name="deserializer">A <see cref="IDeserializer{T}"/> instance used for deserialization of messages received from the feed</param> /// <param name="keyParser">A <see cref="IRoutingKeyParser"/> used to parse the rabbit's routing key</param> /// <param name="producerManager">An <see cref="IProducerManager"/> used to get <see cref="IProducer"/></param> /// <param name="usedReplay">Is connected to the replay server</param> public RabbitMqMessageReceiver(IRabbitMqChannel channel, IDeserializer <FeedMessage> deserializer, IRoutingKeyParser keyParser, IProducerManager producerManager, bool usedReplay) { Guard.Argument(channel, nameof(channel)).NotNull(); Guard.Argument(deserializer, nameof(deserializer)).NotNull(); Guard.Argument(keyParser, nameof(keyParser)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); _channel = channel; _deserializer = deserializer; _keyParser = keyParser; _producerManager = producerManager; _useReplay = usedReplay; }
/// <summary> /// Initializes a new instance of the <see cref="IFeedMessageValidator"/> class /// </summary> /// <param name="marketCacheProvider">The <see cref="IMarketCacheProvider"/> used to get <see cref="IMarketDescription"/></param> /// <param name="defaultCulture">The default culture used to retrieve <see cref="IMarketDescription"/></param> /// <param name="namedValuesProvider">A <see cref="INamedValuesProvider"/> used to provide descriptions for named values</param> /// <param name="producerManager">A <see cref="IProducerManager"/> used to check available producers</param> public FeedMessageValidator(IMarketCacheProvider marketCacheProvider, CultureInfo defaultCulture, INamedValuesProvider namedValuesProvider, IProducerManager producerManager) { Contract.Requires(marketCacheProvider != null); Contract.Requires(defaultCulture != null); Contract.Requires(namedValuesProvider != null); Contract.Requires(producerManager != null); _marketCacheProvider = marketCacheProvider; _defaultCulture = new List <CultureInfo> { defaultCulture }; _namedValuesProvider = namedValuesProvider; _producerManager = producerManager; }
/// <summary> /// Initializes a new instance of the <see cref="IFeedMessageValidator"/> class /// </summary> /// <param name="marketCacheProvider">The <see cref="IMarketCacheProvider"/> used to get <see cref="IMarketDescription"/></param> /// <param name="defaultCulture">The default culture used to retrieve <see cref="IMarketDescription"/></param> /// <param name="namedValuesProvider">A <see cref="INamedValuesProvider"/> used to provide descriptions for named values</param> /// <param name="producerManager">A <see cref="IProducerManager"/> used to check available producers</param> public FeedMessageValidator(IMarketCacheProvider marketCacheProvider, CultureInfo defaultCulture, INamedValuesProvider namedValuesProvider, IProducerManager producerManager) { Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(defaultCulture, nameof(defaultCulture)).NotNull(); Guard.Argument(namedValuesProvider, nameof(namedValuesProvider)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); _marketCacheProvider = marketCacheProvider; _defaultCulture = new List <CultureInfo> { defaultCulture }; _namedValuesProvider = namedValuesProvider; _producerManager = producerManager; }
public CatalogViewModel( IPackageManager packageManager, IProductManager productManager, IProducerManager producerManager, ICategoryManager categoryManager, IMeasureManager measureManager, IPriceManager priceManager ) { _packageManager = packageManager; _productManager = productManager; _producerManager = producerManager; _categoryManager = categoryManager; _measureManager = measureManager; _priceManager = priceManager; }
/// <summary> /// Initializes a new instance of the <see cref="FeedRecoveryManager"/> class /// </summary> /// <param name="producerRecoveryManagerFactory">A <see cref="IProducerRecoveryManagerFactory"/> used to create new <see cref="IProducerRecoveryManager"/></param> /// <param name="config">A <see cref="IOddsFeedConfigurationInternal"/> used on feed</param> /// <param name="timer">A <see cref="ITimer"/> used for invocation of period tasks</param> /// <param name="producerManager">The <see cref="IProducerManager"/> with all available <see cref="IProducer"/></param> /// <param name="systemSession">The <see cref="IFeedSystemSession"/> for processing alive messages</param> public FeedRecoveryManager(IProducerRecoveryManagerFactory producerRecoveryManagerFactory, IOddsFeedConfiguration config, ITimer timer, IProducerManager producerManager, IFeedSystemSession systemSession) { Guard.Argument(producerRecoveryManagerFactory, nameof(producerRecoveryManagerFactory)).NotNull(); Guard.Argument(config, nameof(config)).NotNull(); Guard.Argument(timer, nameof(timer)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); Guard.Argument(systemSession, nameof(systemSession)).NotNull(); _producerRecoveryManagerFactory = producerRecoveryManagerFactory; _inactivityTimer = timer; _producerManager = producerManager; _systemSession = systemSession; }
/// <summary> /// Initializes a new instance of the <see cref="FeedRecoveryManager"/> class /// </summary> /// <param name="producerRecoveryManagerFactory">A <see cref="IProducerRecoveryManagerFactory"/> used to create new <see cref="IProducerRecoveryManager"/></param> /// <param name="config">A <see cref="IOddsFeedConfigurationInternal"/> used on feed</param> /// <param name="timer">A <see cref="ITimer"/> used for invocation of period tasks</param> /// <param name="producerManager">The <see cref="IProducerManager"/> with all available <see cref="IProducer"/></param> /// <param name="systemSession">The <see cref="IFeedSystemSession"/> for processing alive messages</param> public FeedRecoveryManager(IProducerRecoveryManagerFactory producerRecoveryManagerFactory, IOddsFeedConfiguration config, ITimer timer, IProducerManager producerManager, IFeedSystemSession systemSession) { Contract.Requires(producerRecoveryManagerFactory != null); Contract.Requires(config != null); Contract.Requires(timer != null); Contract.Requires(producerManager != null); Contract.Requires(systemSession != null); _producerRecoveryManagerFactory = producerRecoveryManagerFactory; _inactivityTimer = timer; _producerManager = producerManager; _systemSession = systemSession; }
/// <summary> /// Initializes a new instance of the <see cref="RecoveryRequestIssuer"/> class /// </summary> /// <param name="dataPoster">A <see cref="IDataPoster"/> instance used to issue the request to the feed API</param> /// <param name="sequenceGenerator">A <see cref="ISequenceGenerator"/> used to generate the sequence numbers</param> /// <param name="config">The <see cref="IOddsFeedConfiguration"/> used to get nodeId</param> /// <param name="producerManager">The <see cref="IProducerManager"/> used to invoke RequestInitiated event</param> public RecoveryRequestIssuer(IDataPoster dataPoster, ISequenceGenerator sequenceGenerator, IOddsFeedConfiguration config, IProducerManager producerManager) { Guard.Argument(dataPoster, nameof(dataPoster)).NotNull(); Guard.Argument(sequenceGenerator, nameof(sequenceGenerator)).NotNull(); Guard.Argument(config, nameof(config)).NotNull(); Guard.Argument(producerManager, nameof(producerManager)).NotNull(); _dataPoster = dataPoster; _sequenceGenerator = sequenceGenerator; _producerManager = (ProducerManager)producerManager; _nodeId = config.NodeId; }
public ChannelManager(Channel <string, string> channel, IProducerManagerCreator producerManagerCreator, IConsumerManagerCreator consumerManagerCreator) { this.channel = channel; producerManager = producerManagerCreator.Create(channel.Writer); consumerManager = consumerManagerCreator.Create(channel.Reader); }
public ProducerViewModel(IProducerManager manager) { _producerManager = manager; }
public ProducerController(IProducerManager _ProducerManager) { this._ProducerManager = _ProducerManager; }