本文整理汇总了C#中IQueue类的典型用法代码示例。如果您正苦于以下问题:C# IQueue类的具体用法?C# IQueue怎么用?C# IQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IQueue类属于命名空间,在下文中一共展示了IQueue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Mailer
public Mailer(IEmailGenerator emailGenerator, IQueue<MailMessage> queue, FormattingPluginManager pluginManager, IMetricsClient metrics, ILogger<Mailer> logger) {
_emailGenerator = emailGenerator;
_queue = queue;
_pluginManager = pluginManager;
_metrics = metrics;
_logger = logger;
}
示例2: MessagePublisher
public MessagePublisher(IAdvancedBus bus, ILogger logger, IExchange exchange, IQueue queue)
{
_bus = bus;
_logger = logger;
_exchange = exchange;
_queue = queue;
}
示例3: Bind
public void Bind(IQueue destination, IExchange source, params string[] topics)
{
foreach (var topic in topics)
{
_model.QueueBind(destination.Name, source.Name, topic);
}
}
示例4: LuceneSearchDeps
internal LuceneSearchDeps(SearcherManager searcherManager, QueryParser parser, IMetaDataResolver resolver, IQueue queue)
{
this.SearcherManager = searcherManager;
this.Parser = parser;
this.Resolver = resolver;
this.Queue = queue;
}
示例5: ExclusiveConsumer
public ExclusiveConsumer(
IQueue queue,
Func<byte[], MessageProperties, MessageReceivedInfo, Task> onMessage,
IPersistentConnection connection,
IConsumerConfiguration configuration,
IInternalConsumerFactory internalConsumerFactory,
IEventBus eventBus
)
{
Preconditions.CheckNotNull(queue, "queue");
Preconditions.CheckNotNull(onMessage, "onMessage");
Preconditions.CheckNotNull(connection, "connection");
Preconditions.CheckNotNull(internalConsumerFactory, "internalConsumerFactory");
Preconditions.CheckNotNull(eventBus, "eventBus");
Preconditions.CheckNotNull(configuration, "configuration");
this.queue = queue;
this.onMessage = onMessage;
this.connection = connection;
this.configuration = configuration;
this.internalConsumerFactory = internalConsumerFactory;
this.eventBus = eventBus;
timer = new Timer(s =>
{
StartConsumer();
((Timer)s).Change(10000, -1);
});
timer.Change(10000, -1);
}
示例6: QueueNotificationAction
public QueueNotificationAction(IQueue<EventNotificationWorkItem> notificationQueue, IQueue<WebHookNotification> webHookNotificationQueue, IWebHookRepository webHookRepository, WebHookDataPluginManager webHookDataPluginManager, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
_notificationQueue = notificationQueue;
_webHookNotificationQueue = webHookNotificationQueue;
_webHookRepository = webHookRepository;
_webHookDataPluginManager = webHookDataPluginManager;
ContinueOnError = true;
}
示例7: SystemHealthChecker
public SystemHealthChecker(ICacheClient cacheClient, IElasticClient elasticClient, IFileStorage storage, IQueue<StatusMessage> queue, IMessageBus messageBus) {
_cacheClient = cacheClient;
_elasticClient = elasticClient;
_storage = storage;
_queue = queue;
_messageBus = messageBus;
}
示例8: QueueMessageProcessor
public QueueMessageProcessor(ISleepService sleepService, IQueue queue, ITraceService traceService, IQueueMessageParser messageParser)
{
_sleepService = sleepService;
_queue = queue;
_traceService = traceService;
_messageParser = messageParser;
}
示例9: AdminController
public AdminController(IFileStorage fileStorage, IMessagePublisher messagePublisher, IOrganizationRepository organizationRepository, IQueue<EventPost> eventPostQueue, IQueue<WorkItemData> workItemQueue) {
_fileStorage = fileStorage;
_messagePublisher = messagePublisher;
_organizationRepository = organizationRepository;
_eventPostQueue = eventPostQueue;
_workItemQueue = workItemQueue;
}
示例10: GetQueue
protected override IQueue<SimpleWorkItem> GetQueue(int retries = 1, TimeSpan? workItemTimeout = null, TimeSpan? retryDelay = null, int deadLetterMaxItems = 100, bool runQueueMaintenance = true) {
if (_queue == null)
_queue = new InMemoryQueue<SimpleWorkItem>(retries, retryDelay, workItemTimeout: workItemTimeout, loggerFactory: Log);
_logger.Debug("Queue Id: {queueId}", _queue.QueueId);
return _queue;
}
示例11: PlainWorkerPool
public PlainWorkerPool(IQueue workQueue, int nWorkers)
{
this.nWorkers = nWorkers;
this.workQueue = workQueue;
for (int i = 0; i < nWorkers; ++i)
activate();
}
示例12: ThrottleBotsPlugin
public ThrottleBotsPlugin(ICacheClient cacheClient, IEventRepository eventRepository, IProjectRepository projectRepository, IMetricsClient metricsClient, IQueue<WorkItemData> workItemQueue) {
_cacheClient = cacheClient;
_metricsClient = metricsClient;
_eventRepository = eventRepository;
_projectRepository = projectRepository;
_workItemQueue = workItemQueue;
}
示例13: AudioscrobblerConnection
internal AudioscrobblerConnection(IQueue queue)
{
LastfmCore.Account.Updated += AccountUpdated;
state = State.Idle;
this.queue = queue;
}
示例14: Main
public static void Main(string[] args) {
Console.CursorVisible = false;
StartDisplayingLogMessages();
var muxer = ConnectionMultiplexer.Connect("localhost");
_queue = new RedisQueue<PingRequest>(muxer);
var tokenSource = new CancellationTokenSource();
CancellationToken token = tokenSource.Token;
WriteOptionsMenu();
while (true) {
Console.SetCursorPosition(0, OPTIONS_MENU_LINE_COUNT + 1);
ConsoleKeyInfo keyInfo = Console.ReadKey(true);
if (keyInfo.Key == ConsoleKey.D1)
EnqueuePing();
else if (keyInfo.Key == ConsoleKey.D2)
EnqueuePing(100);
//else if (keyInfo.Key == ConsoleKey.D3)
// EnqueueContinuousPings(50, token, 100);
//else if (keyInfo.Key == ConsoleKey.D4)
// EnqueueContinuousPings(50, token, 100);
else if (keyInfo.Key == ConsoleKey.Q)
break;
else if (keyInfo.Key == ConsoleKey.S) {
tokenSource.Cancel();
tokenSource = new CancellationTokenSource();
token = tokenSource.Token;
ClearOutputLines();
}
}
}
示例15: StatusUpdater
private StatusUpdater()
{
roverStatus = new RoverStatus();
//timer = new System.Timers.Timer(Properties.Settings.Default.StatusUpdateInterval) { Enabled = false };
updatesQueue = new PriorityQueue(100);
listener = new MessageListener(Properties.NetworkSettings.Default.StatusUpdatePort, updatesQueue, Properties.NetworkSettings.Default.RoverIPAddress);
}