/// <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="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; }