public HttpContextHolder(long session)
    {
        string version = SessionManager.Default.GetVersion(session);
        this._Version = version == null ? "ENG" : version;

        this._TradingConsoleServer = Application.Default.TradingConsoleServer;
        this._AsyncResultManager = Application.Default.AsyncResultManager;

        this._Token = SessionManager.Default.GetToken(session);
        this._TradingConsoleState = SessionManager.Default.GetTradingConsoleState(session);
    }
Ejemplo n.º 2
0
 private DataSet GetTickDatas(Guid instrumentId, DateTime dateTime, int minutes, TradingConsoleState state, TradingConsoleServer tradingConsoleServer)
 {
     try
     {
         if (state.Instruments.ContainsKey(instrumentId))
         {
             Guid quotePolicyId = (Guid)state.Instruments[instrumentId];
             DataSet dataSet = tradingConsoleServer.GetTickDatas(instrumentId, quotePolicyId, dateTime, minutes);
             return dataSet;
         }
         else
         {
             AppDebug.LogEvent("TradingConsole.GetTickDatas", string.Format("Instrument {0} doesn't exists in TradingConsoleState", instrumentId), EventLogEntryType.Warning);
             return null;
         }
     }
     catch (Exception e)
     {
         AppDebug.LogEvent("TradingConsole.GetTickDatas", e.ToString(), EventLogEntryType.Error);
         return null;
     }
 }