当前位置: 首页>>代码示例>>C#>>正文


C# IQueue类代码示例

本文整理汇总了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;
 }
开发者ID:rpotalara,项目名称:Exceptionless,代码行数:7,代码来源:Mailer.cs

示例2: MessagePublisher

 public MessagePublisher(IAdvancedBus bus, ILogger logger, IExchange exchange, IQueue queue)
 {
     _bus = bus;
     _logger = logger;
     _exchange = exchange;
     _queue = queue;
 }
开发者ID:radicalgeek,项目名称:SampleMicroservice,代码行数:7,代码来源:MessagePublisher.cs

示例3: Bind

 public void Bind(IQueue destination, IExchange source, params string[] topics)
 {
     foreach (var topic in topics)
     {
         _model.QueueBind(destination.Name, source.Name, topic);
     }
 }
开发者ID:rmja,项目名称:Queueing,代码行数:7,代码来源:RabbitMQBroker.cs

示例4: LuceneSearchDeps

 internal LuceneSearchDeps(SearcherManager searcherManager, QueryParser parser, IMetaDataResolver resolver, IQueue queue)
 {
     this.SearcherManager = searcherManager;
     this.Parser = parser;
     this.Resolver = resolver;
     this.Queue = queue;
 }
开发者ID:daszat,项目名称:zetbox,代码行数:7,代码来源:Module.cs

示例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);
  }
开发者ID:hippasus,项目名称:EasyNetQ,代码行数:29,代码来源:ExclusiveConsumer.cs

示例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;
 }
开发者ID:rpotalara,项目名称:Exceptionless,代码行数:7,代码来源:070_QueueNotificationAction.cs

示例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;
 }
开发者ID:Winterleaf,项目名称:Exceptionless,代码行数:7,代码来源:SystemHealthChecker.cs

示例8: QueueMessageProcessor

 public QueueMessageProcessor(ISleepService sleepService, IQueue queue, ITraceService traceService, IQueueMessageParser messageParser)
 {
     _sleepService = sleepService;
     _queue = queue;
     _traceService = traceService;
     _messageParser = messageParser;
 }
开发者ID:sutamatej,项目名称:AzureCloudService,代码行数:7,代码来源:QueueMessageProcessor.cs

示例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;
 }
开发者ID:rpotalara,项目名称:Exceptionless,代码行数:7,代码来源:AdminController.cs

示例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;
        }
开发者ID:geffzhang,项目名称:Foundatio,代码行数:7,代码来源:InMemoryQueueTests.cs

示例11: PlainWorkerPool

 public PlainWorkerPool(IQueue workQueue, int nWorkers)
 {
     this.nWorkers = nWorkers;
     this.workQueue = workQueue;
     for (int i = 0; i < nWorkers; ++i)
         activate();
 }
开发者ID:michaelpantic,项目名称:Robot,代码行数:7,代码来源:PlainWorkerPool.cs

示例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;
 }
开发者ID:Winterleaf,项目名称:Exceptionless,代码行数:7,代码来源:0_ThrottleBotsPlugin.cs

示例13: AudioscrobblerConnection

        internal AudioscrobblerConnection(IQueue queue)
        {
            LastfmCore.Account.Updated += AccountUpdated;

            state = State.Idle;
            this.queue = queue;
        }
开发者ID:BackupTheBerlios,项目名称:molecule-svn,代码行数:7,代码来源:AudioscrobblerConnection.cs

示例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();
                }
            }
        }
开发者ID:geffzhang,项目名称:Foundatio,代码行数:34,代码来源:Program.cs

示例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);
 }
开发者ID:jpadillak,项目名称:Concordia_Capstone2013-14,代码行数:7,代码来源:StatusUpdater.cs


注:本文中的IQueue类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。