コード例 #1
0
        private static List <VisualBubble> LoadBubblesIntoQueryAgent(Agent innerGroupAgent, BubbleGroup innerGroup,
                                                                     long currentTime, int maxLoadPerGroup, LoadBubblesIntoStateHolder innerGroupState)
        {
            try
            {
                var task = innerGroupAgent.LoadBubbles(innerGroup, currentTime, maxLoadPerGroup);
                task.Wait();
                var loadedBubbles = task.Result;

                if (loadedBubbles == null || loadedBubbles.Count == 0)
                {
                    innerGroupState.Dead = true;
                    return(null);
                }
                else
                {
                    BubbleManager.AddUrlMarkupIfNeeded(loadedBubbles);
                    return(loadedBubbles);
                }
            }
            catch (Exception ex)
            {
                Utils.DebugPrint("Loading bubbles for service " +
                                 innerGroup.Service.Information.ServiceName + " on group " + innerGroup.ID + " failed: " + ex);
                innerGroupState.Dead = true;
            }

            return(null);
        }
コード例 #2
0
 public Result(Type resultType, string newActionId, VisualBubble[] updates, VisualBubble[] inserts)
 {
     NewActionId = newActionId;
     Updates     = updates;
     Inserts     = inserts;
     ResultType  = resultType;
     BubbleManager.AddUrlMarkupIfNeeded(updates);
     BubbleManager.AddUrlMarkupIfNeeded(inserts);
 }