Пример #1
0
        private static ProcessedSignal EnqueueProcessedSignalRecord(TradeSignalAction action)
        {
            var record = new ProcessedSignal {
                signal = action
            };

            processedSignals.Enqueue(record);
            return(record);
        }
Пример #2
0
 private static string RenderSignalDeliveryStatus(ProcessedSignal signal)
 {
     if (signal.subscriberAccountProcessingStatus.Count == 0)
         return "-";
     if (signal.subscriberAccountProcessingStatus.Count == 1)
     {
         var deliveryStatus = signal.subscriberAccountProcessingStatus.First();
         return "#" + deliveryStatus.Key + ": " + deliveryStatus.Value;
     }
     var sb = new StringBuilder("<a href=\"#\" onclick=\"$(this).next().toggle()\">Подписчиков: " +
                                signal.subscriberAccountProcessingStatus.Count + "</a>");
     sb.AppendLine("      <div style=\"display:none\">");
     sb.Append(string.Join("<br/>", signal.subscriberAccountProcessingStatus.Select(p =>
                                                                                    "#" + p.Key + ": " + p.Value)));
     sb.AppendLine(" </div>");
     return sb.ToString();
 }
Пример #3
0
        private static string RenderSignalDeliveryStatus(ProcessedSignal signal)
        {
            if (signal.subscriberAccountProcessingStatus.Count == 0)
            {
                return("-");
            }
            if (signal.subscriberAccountProcessingStatus.Count == 1)
            {
                var deliveryStatus = signal.subscriberAccountProcessingStatus.First();
                return("#" + deliveryStatus.Key + ": " + deliveryStatus.Value);
            }
            var sb = new StringBuilder("<a href=\"#\" onclick=\"$(this).next().toggle()\">Подписчиков: " +
                                       signal.subscriberAccountProcessingStatus.Count + "</a>");

            sb.AppendLine("      <div style=\"display:none\">");
            sb.Append(string.Join("<br/>", signal.subscriberAccountProcessingStatus.Select(p =>
                                                                                           "#" + p.Key + ": " + p.Value)));
            sb.AppendLine(" </div>");
            return(sb.ToString());
        }
Пример #4
0
 private static ProcessedSignal EnqueueProcessedSignalRecord(TradeSignalAction action)
 {
     var record = new ProcessedSignal {signal = action};
     processedSignals.Enqueue(record);
     return record;
 }