public IAsyncResult BeginGetQuotations(Guid instrumentId, ChartFrequency frequency, DateTime fromTime, DateTime toTime, bool fixLastPeriod, AsyncCallback callback, object state) { try { AsyncGetQuotationResult result = new AsyncGetQuotationResult(callback,instrumentId, frequency.ToString(), fromTime, toTime, fixLastPeriod,state); ThreadPool.QueueUserWorkItem(GetChartQuotation, result); return result; } catch (Exception ex) { HtmlPage.Window.Invoke("WriteLog", ex.ToString()); //Logger.TraceEvent(Omnicare.Diagnostics.TraceEventType.Error, "{0}", ex.ToString()); return null; } }
public IAsyncResult BeginGetLastQuotationsForTrendSheet(Guid instrumentId, ChartFrequency frequency, DateTime fromTime, decimal open, AsyncCallback callback, object state) { AsyncGetLastQuotationsResult result = new AsyncGetLastQuotationsResult(callback, instrumentId, frequency.ToString(), fromTime, open, state); ThreadPool.QueueUserWorkItem(GetLastQuotationsForTrendSheet, result); return result; }