示例#1
0
        internal MarketRulesManager(string fixtureId, IStoredObjectProvider stateProvider, IEnumerable <IMarketRule> filteringRules)
        {
            _logger.DebugFormat("Initialising market rule manager for fixtureId={0}", fixtureId);

            _fixtureId = fixtureId;
            _rules     = filteringRules;

            _stateProvider = stateProvider;

            _logger.InfoFormat("Initialised market rule manager for fixtureId={0}", fixtureId);
        }
        internal MarketRulesManager(string fixtureId, IStoredObjectProvider stateProvider, IEnumerable<IMarketRule> filteringRules)
        {
            _logger.DebugFormat("Initialising market rule manager for fixtureId={0}", fixtureId);
            
            _fixtureId = fixtureId;
            _rules = filteringRules;

            _stateProvider = stateProvider;

            _logger.InfoFormat("Initialised market rule manager for fixtureId={0}", fixtureId);
        }
示例#3
0
        internal MarketRulesManager(string fixtureId, IStoredObjectProvider stateProvider, IEnumerable <IMarketRule> filteringRules)
        {
            _logger.DebugFormat("Initialising market rule manager for fixtureId={0}", fixtureId);

            _fixtureId = fixtureId;
            _rules     = filteringRules;

            _stateProvider = stateProvider;

            _logger.InfoFormat("Initialised market rule manager for fixtureId={0}", fixtureId);

            var value = ConfigurationManager.AppSettings["logDetailedMarketRules"];

            logDetailedMarketRules = string.IsNullOrEmpty(value) && Convert.ToBoolean(value);
        }
        public void SetUp()
        {
            _marketStorage = null;
            _objectProvider = null;

            SetUpSnapshotAndMarkets();

            var objectProviderMock = new Mock<IStoredObjectProvider>();

            // if there's a better way of assigning parameter let me know
            objectProviderMock.Setup(x => x.SetObject(It.IsAny<string>(), It.IsAny<IUpdatableMarketStateCollection>()))
                              .Callback<string, IUpdatableMarketStateCollection>((s, newState) => _marketStorage = newState);

            objectProviderMock.Setup(x => x.GetObject(It.IsAny<string>())).Returns(() => _marketStorage);

            _objectProvider = objectProviderMock.Object;
        }