public virtual Lightstreamer.DotNet.Client.SubscribedTableKey[] SubscribeItems(ExtendedTableInfo items, IHandyTableListener listener) { Lightstreamer.DotNet.Client.SubscribedTableKey[] keyArray; ServerManager connManager = this.ConnManager; VirtualTableManager table = new VirtualTableManager(items, listener); try { keyArray = connManager.SubscrItems(table, true); } catch (PhaseException) { throw new SubscrException("Connection closed"); } return(keyArray); }
public virtual void DoUpdate(Lightstreamer.DotNet.Client.ServerUpdateEvent values) { if (values.ItemCode != 1) { throw new PushServerException(2); } if (this.enclosingInstance.managerWithListener != null) { this.enclosingInstance.managerWithListener.ProcessUpdate(values, this.itemIndex + 1, this.itemIndex); } else if (this.enclosingInstance.extListener != null) { ExtendedTableManager.ProcessUpdate(values, this.itemIndex, this.enclosingInstance.table, this.enclosingInstance.extListener); } else { VirtualTableManager.ProcessFastUpdate(values, this.itemIndex, this.enclosingInstance.table, this.enclosingInstance.fastListener); } }
internal virtual void RequestItemsSubscr(VirtualTableManager table, Lightstreamer.DotNet.Client.SubscribedTableKey[] subscrKeys, BatchMonitor batch) { string[] winCodes = new string[subscrKeys.Length]; for (int i = 0; i < subscrKeys.Length; i++) { winCodes[i] = subscrKeys[i].KeyValue.ToString(); } this.Check(); try { this.serverTranslator.CallItemsRequest(this.serverInfo, winCodes, table, batch); } catch (IOException exception) { throw new PushConnException(exception); } catch (WebException exception2) { throw new PushConnException(exception2); } this.Check(); }
internal virtual void CallItemsRequest(PushServerProxy.PushServerProxyInfo pushInfo, string[] tableCodes, VirtualTableManager table, BatchMonitor batch) { IDictionary parameters = new Dictionary<string, string>(); parameters["LS_session"] = pushInfo.sessionId; parameters["LS_op"] = "add"; parameters["LS_mode"] = table.Mode; parameters["LS_schema"] = table.Schema; if (table.DataAdapter != null) { parameters["LS_data_adapter"] = table.DataAdapter; } for (int i = 0; i < table.NumItems; i++) { parameters["LS_table" + (i + 1)] = tableCodes[i]; parameters["LS_id" + (i + 1)] = table.GetItemName(i); if (table.Selector != null) { parameters["LS_selector" + (i + 1)] = table.Selector; } if (table.Snapshot) { if (table.DistinctSnapshotLength != -1) { parameters["LS_Snapshot" + (i + 1)] = table.DistinctSnapshotLength.ToString(); } else { parameters["LS_Snapshot" + (i + 1)] = "true"; } } if (table.Unfiltered) { parameters["LS_requested_max_frequency" + (i + 1)] = "unfiltered"; } else if (!(table.MaxFrequency == -1.0)) { parameters["LS_requested_max_frequency" + (i + 1)] = table.MaxFrequency.ToString(); } if (table.MaxBufferSize != -1) { parameters["LS_requested_buffer_size" + (i + 1)] = table.MaxBufferSize.ToString(); } } this.DoControlRequest(pushInfo, parameters, batch); }
internal virtual Lightstreamer.DotNet.Client.SubscribedTableKey[] SubscrItems(VirtualTableManager table, bool batchable) { int i; object CS$2$0003; if (table.NumItems == 0) { if (batchable) { this.UnbatchRequest(); } return new Lightstreamer.DotNet.Client.SubscribedTableKey[0]; } Lightstreamer.DotNet.Client.SubscribedTableKey[] subscrKeys = new Lightstreamer.DotNet.Client.SubscribedTableKey[table.NumItems]; actionsLogger.Info(string.Concat(new object[] { "Adding ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((CS$2$0003 = this.tables.SyncRoot)) { for (i = 0; i < table.NumItems; i++) { subscrKeys[i] = this.localPushServerProxy.TableCode; this.tables[subscrKeys[i].KeyValue] = table.GetItemManager(i); } } bool ok = false; try { this.localPushServerProxy.RequestItemsSubscr(table, subscrKeys, batchable ? this.batchMonitor : null); ok = true; } finally { if (!ok) { actionsLogger.Info(string.Concat(new object[] { "Undoing add of ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((CS$2$0003 = this.tables.SyncRoot)) { for (i = 0; i < subscrKeys.Length; i++) { this.tables.Remove(subscrKeys[i].KeyValue); } } } } return subscrKeys; }
public MonoTableManager(VirtualTableManager enclosingInstance, int itemIndex) { this.enclosingInstance = enclosingInstance; this.itemIndex = itemIndex; }
public virtual Lightstreamer.DotNet.Client.SubscribedTableKey[] SubscribeItems(ExtendedTableInfo items, IHandyTableListener listener) { Lightstreamer.DotNet.Client.SubscribedTableKey[] CS$1$0000; ServerManager currConnManager = this.ConnManager; VirtualTableManager tableInfo = new VirtualTableManager(items, listener); try { CS$1$0000 = currConnManager.SubscrItems(tableInfo, true); } catch (PhaseException) { throw new SubscrException("Connection closed"); } return CS$1$0000; }
public virtual SubscribedTableKey[] SubscribeItems(ExtendedTableInfo items, IHandyTableListener listener) { SubscribedTableKey[] keyArray; ServerManager connManager = this.ConnManager; VirtualTableManager table = new VirtualTableManager(items, listener); try { keyArray = connManager.SubscrItems(table, true); } catch (PhaseException) { throw new SubscrException("Connection closed"); } return keyArray; }
internal virtual void CallItemsRequest(PushServerProxy.PushServerProxyInfo pushInfo, string[] winCodes, VirtualTableManager table, BatchMonitor batch) { Hashtable parameters = new Hashtable(); parameters["LS_session"] = pushInfo.sessionId; parameters["LS_op"] = "add"; parameters["LS_mode"] = table.Mode; parameters["LS_schema"] = table.Schema; if (table.DataAdapter != null) { parameters["LS_data_adapter"] = table.DataAdapter; } for (int i = 0; i < table.NumItems; i++) { parameters["LS_window" + (i + 1)] = winCodes[i]; parameters["LS_id" + (i + 1)] = table.GetItemName(i); if (table.Selector != null) { parameters["LS_selector" + (i + 1)] = table.Selector; } if (table.Snapshot) { if (table.DistinctSnapshotLength != -1) { parameters["LS_Snapshot" + (i + 1)] = table.DistinctSnapshotLength.ToString(); } else { parameters["LS_Snapshot" + (i + 1)] = "true"; } } if (table.Unfiltered) { parameters["LS_requested_max_frequency" + (i + 1)] = "unfiltered"; } else if (!(table.MaxFrequency == -1.0)) { parameters["LS_requested_max_frequency" + (i + 1)] = table.MaxFrequency.ToString(); } if (table.MaxBufferSize != -1) { parameters["LS_requested_buffer_size" + (i + 1)] = table.MaxBufferSize.ToString(); } } this.DoControlRequest(pushInfo, parameters, batch); }
internal virtual Lightstreamer.DotNet.Client.SubscribedTableKey[] SubscrItems(VirtualTableManager table, bool batchable) { int num; object obj2; Lightstreamer.DotNet.Client.SubscribedTableKey[] subscrKeys = new Lightstreamer.DotNet.Client.SubscribedTableKey[table.NumItems]; actionsLogger.Info(string.Concat(new object[] { "Adding ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((obj2 = this.tables.SyncRoot)) { for (num = 0; num < table.NumItems; num++) { subscrKeys[num] = this.localPushServerProxy.WindowCode; this.tables[subscrKeys[num].KeyValue] = table.GetItemManager(num); } } bool flag = false; try { this.localPushServerProxy.RequestItemsSubscr(table, subscrKeys, batchable ? this.batchMonitor : null); flag = true; } finally { if (!flag) { actionsLogger.Info(string.Concat(new object[] { "Undoing add of ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((obj2 = this.tables.SyncRoot)) { for (num = 0; num < subscrKeys.Length; num++) { this.tables.Remove(subscrKeys[num].KeyValue); } } } } return(subscrKeys); }
internal virtual Lightstreamer.DotNet.Client.SubscribedTableKey[] SubscrItems(VirtualTableManager table, bool batchable) { int num; object obj2; Lightstreamer.DotNet.Client.SubscribedTableKey[] subscrKeys = new Lightstreamer.DotNet.Client.SubscribedTableKey[table.NumItems]; actionsLogger.Info(string.Concat(new object[] { "Adding ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((obj2 = this.tables.SyncRoot)) { for (num = 0; num < table.NumItems; num++) { subscrKeys[num] = this.localPushServerProxy.WindowCode; this.tables[subscrKeys[num].KeyValue] = table.GetItemManager(num); } } bool flag = false; try { this.localPushServerProxy.RequestItemsSubscr(table, subscrKeys, batchable ? this.batchMonitor : null); flag = true; } finally { if (!flag) { actionsLogger.Info(string.Concat(new object[] { "Undoing add of ", table, " to session ", this.localPushServerProxy.SessionId })); lock ((obj2 = this.tables.SyncRoot)) { for (num = 0; num < subscrKeys.Length; num++) { this.tables.Remove(subscrKeys[num].KeyValue); } } } } return subscrKeys; }