Example #1
0
        public EventContext(BloombergSessionWrapper bloombergSessionWrapper)
        {
            SessionContext      = bloombergSessionWrapper;
            strategiesContainer = new UnityContainer();

            RegisterDefaultBehaviour();
        }
Example #2
0
 private void ProcessEvent(Event eventObj, BloombergSessionWrapper session)
 {
     try
     {
         var handler = strategiesContainer.Resolve <ISessionEventHandler>(eventObj.Type.ToString());
         if (handler != null)
         {
             handler.ProcessEvent(eventObj, session);
         }
     }
     catch (Exception ex)
     {
         // take ex and pass it to the event Handler...
         //strategiesContainer.Resolve<ISessionEventHandler>(exceptionProcessorId).ProcessEvent(eventObj, session);
         Console.WriteLine(ex);
     }
 }