internal static void ProcessUpdate(Lightstreamer.DotNet.Client.ServerUpdateEvent values, int itemIndex, ExtendedTableInfo table, IExtendedTableListener listener)
        {
            string item = table.items[itemIndex];

            if (values.EOS)
            {
                try
                {
                    listener.OnSnapshotEnd(item);
                }
                catch (Exception)
                {
                }
            }
            else if (values.Overflow > 0)
            {
                if (!table.hasUnfilteredData())
                {
                    throw new PushServerException(7);
                }
                actionsLogger.Warn("Got notification of updates lost for item " + item);
                try
                {
                    listener.OnRawUpdatesLost(item, values.Overflow);
                }
                catch (Exception)
                {
                }
            }
            else
            {
                if (values.Size != table.fields.Length)
                {
                    throw new PushServerException(3);
                }
                IDictionary map = values.GetMap(table.fields);
                if (actionsLogger.IsDebugEnabled)
                {
                    actionsLogger.Debug("Got event for item " + item + " with values " + CollectionsSupport.ToString(map));
                }
                try
                {
                    listener.OnUpdate(item, map);
                }
                catch (Exception)
                {
                }
            }
        }
 internal static void ProcessUpdate(Lightstreamer.DotNet.Client.ServerUpdateEvent values, int itemIndex, ExtendedTableInfo table, IExtendedTableListener listener)
 {
     string item = table.items[itemIndex];
     if (values.EOS)
     {
         try
         {
             listener.OnSnapshotEnd(item);
         }
         catch (Exception)
         {
         }
     }
     else if (values.Overflow > 0)
     {
         if (!table.hasUnfilteredData())
         {
             throw new PushServerException(7);
         }
         actionsLogger.Warn("Got notification of updates lost for item " + item);
         try
         {
             listener.OnRawUpdatesLost(item, values.Overflow);
         }
         catch (Exception)
         {
         }
     }
     else
     {
         if (values.Size != table.fields.Length)
         {
             throw new PushServerException(3);
         }
         IDictionary map = values.GetMap(table.fields);
         if (actionsLogger.IsDebugEnabled)
         {
             actionsLogger.Debug("Got event for item " + item + " with values " + CollectionsSupport.ToString(map));
         }
         try
         {
             listener.OnUpdate(item, map);
         }
         catch (Exception)
         {
         }
     }
 }
Example #3
0
 private static void ProcessFastUpdate(Lightstreamer.DotNet.Client.ServerUpdateEvent values, int itemIndex, ExtendedTableInfo table, IFastItemsListener listener)
 {
     if (values.EOS)
     {
         try
         {
             listener.OnSnapshotEnd(itemIndex + 1);
         }
         catch (Exception)
         {
         }
     }
     else if (values.Overflow > 0)
     {
         if (!table.hasUnfilteredData())
         {
             throw new PushServerException(7);
         }
         try
         {
             listener.OnRawUpdatesLost(itemIndex + 1, values.Overflow);
         }
         catch (Exception)
         {
         }
     }
     else
     {
         if (values.Size != table.fields.Length)
         {
             throw new PushServerException(3);
         }
         string[] array = values.Array;
         if (actionsLogger.IsDebugEnabled)
         {
             actionsLogger.Debug("Got event for item " + table.items[itemIndex] + " with values " + CollectionsSupport.ToString(array) + " for fields " + CollectionsSupport.ToString(table.fields));
         }
         try
         {
             listener.OnUpdate(itemIndex + 1, array);
         }
         catch (Exception)
         {
         }
     }
 }
 private static void ProcessFastUpdate(ServerUpdateEvent values, int itemIndex, ExtendedTableInfo table, IFastItemsListener listener)
 {
     if (values.EOS)
     {
         try
         {
             listener.OnSnapshotEnd(itemIndex + 1);
         }
         catch (Exception)
         {
         }
     }
     else if (values.Overflow > 0)
     {
         if (!table.hasUnfilteredData())
         {
             throw new PushServerException(7);
         }
         try
         {
             listener.OnRawUpdatesLost(itemIndex + 1, values.Overflow);
         }
         catch (Exception)
         {
         }
     }
     else
     {
         if (values.Size != table.fields.Length)
         {
             throw new PushServerException(3);
         }
         string[] array = values.Array;
         if (actionsLogger.IsDebugEnabled)
         {
             actionsLogger.Debug("Got event for item " + table.items[itemIndex] + " with values " + CollectionsSupport.ToString(array) + " for fields " + CollectionsSupport.ToString(table.fields));
         }
         try
         {
             listener.OnUpdate(itemIndex + 1, array);
         }
         catch (Exception)
         {
         }
     }
 }