GetItemManager() публичный Метод

public GetItemManager ( int i ) : object
i int
Результат object
Пример #1
0
        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);
        }
Пример #2
0
 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;
 }
 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;
 }