protected override void OnStop(ADLite.AlfaDirect alfaDirect) { string msg; alfaDirect.UnSubscribeTable("fin_info", "paper_no in (36929, 102155)", out msg); Console.WriteLine(msg); alfaDirect.OnTableChanged -= AlfaDirect_OnTableChanged; }
protected override void OnStart(ADLite.AlfaDirect alfaDirect) { alfaDirect.GlobalFilter["FI"] = "36929|102155"; // USD-3.15 & BR-3.15 string msg; alfaDirect.OnTableChanged += AlfaDirect_OnTableChanged; alfaDirect.SubscribeTable("fin_info", "*", "paper_no in (36929, 102155)", eSubsctibeOptions.Default, out msg); Console.WriteLine(msg); }
protected override void OnStart(ADLite.AlfaDirect alfaDirect) { writer = writerFactory.GetTextWriter(); alfaDirect.OnTableChanged += AlfaDirect_OnTableChanged; subscriptionParams = GetSubscriptionParams(alfaDirect); foreach (var filterEntry in subscriptionParams.GlobalFilter) { alfaDirect.GlobalFilter[filterEntry.Item1] = filterEntry.Item2; } string message; alfaDirect.SubscribeTable(subscriptionParams.Table, subscriptionParams.Columns, subscriptionParams.TableFilter, eSubsctibeOptions.Default, out message); Utils.Trace.TraceInformation(message); }
protected override void OnStop(ADLite.AlfaDirect alfaDirect) { try { string message; alfaDirect.UnSubscribeTable(subscriptionParams.Table, subscriptionParams.TableFilter, out message); alfaDirect.OnTableChanged -= AlfaDirect_OnTableChanged; Utils.Trace.TraceInformation(message); } finally { lock (writer) { writer.Flush(); writer.Close(); writer = null; } } }
internal AlfaException(ADLite.tagStateCodes code, string message) : base(LocalizedStrings.Str1701Params.Put(code, message)) { Code = (AlfaExceptionCodes)(int)code; }
public void ReleaseAlfaDirect(ADLite.AlfaDirect alfaDirect) { }
protected override SubscriptionParams GetSubscriptionParams(ADLite.IAlfaDirect alfaDirect) { var paperNo = PaperNo(instrument, alfaDirect); var filter = "paper_no = " + paperNo; return new SubscriptionParams("fin_info", "*", filter, new GlobalFilter(paperNo)); }