/// <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="profileCache">A <see cref="IProfileCache"/> instance used to retrieve player and competitor profiles</param> /// <param name="expressionFactory">A <see cref="INameExpressionFactory"/> instance used to built <see cref="INameExpression"/> instances</param> /// <param name="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> specifying how to handle potential exceptions thrown to the user code</param> public NameProviderFactory(IMarketCacheProvider marketCacheProvider, IProfileCache profileCache, INameExpressionFactory expressionFactory, ExceptionHandlingStrategy exceptionStrategy) { Contract.Requires(marketCacheProvider != null); Contract.Requires(profileCache != null); Contract.Requires(expressionFactory != null); _marketCacheProvider = marketCacheProvider; _profileCache = profileCache; _expressionFactory = expressionFactory; _exceptionStrategy = exceptionStrategy; }
/// <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="profileCache">A <see cref="IProfileCache"/> instance used to retrieve player and competitor profiles</param> /// <param name="expressionFactory">A <see cref="INameExpressionFactory"/> instance used to built <see cref="INameExpression"/> instances</param> /// <param name="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> specifying how to handle potential exceptions thrown to the user code</param> public NameProviderFactory(IMarketCacheProvider marketCacheProvider, IProfileCache profileCache, INameExpressionFactory expressionFactory, ExceptionHandlingStrategy exceptionStrategy) { Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(profileCache, nameof(profileCache)).NotNull(); Guard.Argument(expressionFactory, nameof(expressionFactory)).NotNull(); _marketCacheProvider = marketCacheProvider; _profileCache = profileCache; _expressionFactory = expressionFactory; _exceptionStrategy = exceptionStrategy; }
/// <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="profileCache">A <see cref="IProfileCache"/> instance used to retrieve player and competitor profiles</param> /// <param name="expressionFactory">A <see cref="INameExpressionFactory"/> instance used to built <see cref="INameExpression"/> instances</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="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> describing the mode in which the SDK is running</param> internal NameProvider( IMarketCacheProvider marketCacheProvider, IProfileCache profileCache, INameExpressionFactory expressionFactory, ISportEvent sportEvent, int marketId, IReadOnlyDictionary <string, string> specifiers, ExceptionHandlingStrategy exceptionStrategy) { Guard.Argument(marketCacheProvider, nameof(marketCacheProvider)).NotNull(); Guard.Argument(profileCache, nameof(profileCache)).NotNull(); Guard.Argument(expressionFactory, nameof(expressionFactory)).NotNull(); Guard.Argument(sportEvent, nameof(sportEvent)).NotNull(); _marketCacheProvider = marketCacheProvider; _profileCache = profileCache; _expressionFactory = expressionFactory; _sportEvent = sportEvent; _marketId = marketId; _specifiers = specifiers; _exceptionStrategy = exceptionStrategy; _competitorsAlreadyFetched = false; }
/// <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="profileCache">A <see cref="IProfileCache"/> instance used to retrieve player and competitor profiles</param> /// <param name="expressionFactory">A <see cref="INameExpressionFactory"/> instance used to built <see cref="INameExpression"/> instances</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="exceptionStrategy">A <see cref="ExceptionHandlingStrategy"/> describing the mode in which the SDK is running</param> internal NameProvider( IMarketCacheProvider marketCacheProvider, IProfileCache profileCache, INameExpressionFactory expressionFactory, ISportEvent sportEvent, int marketId, IReadOnlyDictionary <string, string> specifiers, ExceptionHandlingStrategy exceptionStrategy) { Contract.Requires(marketCacheProvider != null); Contract.Requires(profileCache != null); Contract.Requires(expressionFactory != null); Contract.Requires(sportEvent != null); _marketCacheProvider = marketCacheProvider; _profileCache = profileCache; _expressionFactory = expressionFactory; _sportEvent = sportEvent; _marketId = marketId; _specifiers = specifiers; _exceptionStrategy = exceptionStrategy; _competitorsAlreadyFetched = false; }