private static ProcessedSignal EnqueueProcessedSignalRecord(TradeSignalAction action) { var record = new ProcessedSignal { signal = action }; processedSignals.Enqueue(record); return(record); }
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(); }
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()); }
private static ProcessedSignal EnqueueProcessedSignalRecord(TradeSignalAction action) { var record = new ProcessedSignal {signal = action}; processedSignals.Enqueue(record); return record; }