Exemple #1
0
        public BergController()
        {
            Db                       = new Database();
            _routingRules            = Db.GetRoutingRules();
            FieldPricingCategories   = Db.GetFieldPricingCategories();
            _adHocQueueController    = new BloombergAdHocController(this);
            _datawarehouseController = new BloombergDatawarehouseController(this);
            ApiController            = new BloombergApiController(this);

            _localQueueTimer.Elapsed += mainTimer_Elapsed;
            _localQueueTimer.Interval = Settings.Default.MillisecondTimerInterval;

            //deal with stale messages on startup before starting timers
            OnResurrect();
        }
Exemple #2
0
        public List <RequestItem> GetTickerItemsToProcess(string sql)
        {
            //The sql needs to return request items with columns same name as the RequestItem members
            List <RequestItem> requestItems = Utils.DbController.GetObjects <RequestItem>(sql);

            requestItems.ForEach(x =>
            {
                x.Errors = "";
                x.OriginalInputTicker = x.BBTicker;
                // check for sedol ticker which must be in the correct format
                if (x.BBTicker.EndsWith("SEDOL1"))
                {
                    x.BBTicker = @"/SEDOL1/" + x.BBTicker.Replace(" SEDOL1", string.Empty);
                }

                BloombergApiController.AddFieldFromFieldList(x);
                BloombergApiController.ValidateRequest(x);
            });

            return(requestItems);
        }