本文整理汇总了C#中IQueue类的典型用法代码示例。如果您正苦于以下问题:C# IQueue类的具体用法?C# IQueue怎么用?C# IQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IQueue类属于命名空间,在下文中一共展示了IQueue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: ContextSwitchRecord
/// <summary>
/// Record from a queue. The only real use case for this record as of now.
/// </summary>
/// <param name="queue">The queue to create this record from.</param>
public ContextSwitchRecord(IQueue queue)
{
Process next = queue.GetContextSwitch();
this.Ready = new List<ProcessRecord>();
this.IO = new List<ProcessRecord>();
this.Complete = new List<ProcessRecord>();
this.Running = null;
if (next != null && queue.State != QueueState.COMPLETE) this.Running = new ProcessRecord(next.Name, next.Parent.Name, next.Time.Current.Duration);
this.Time = queue.TotalTime - 1; //-1 because we're checking this AFTER it has incremented times.
foreach (Process p in queue.CompleteProcs)
{
ProcessRecord add = new ProcessRecord()
{
Name = p.Name,
Parent = p.Parent.Name,
CurrentTime = p.Time.Current == null ? 0 : p.Time.Current.Duration
};
this.Complete.Add(add);
}
foreach (Process p in queue.IOProcs) this.IO.Add(new ProcessRecord(p.Name, p.Parent.Name, p.Time.Current.Duration));
foreach (Process p in queue.ReadyProcs)
{
if(p != next) this.Ready.Add(new ProcessRecord(p.Name, p.Parent.Name, p.Time.Current.Duration));
}
}
开发者ID:phalpin,项目名称:cpusched,代码行数:33,代码来源:ContextSwitchRecord.cs
示例15: AddPool
public void AddPool(IQueue<PacketEventArgs> item)
{
if (!this.container.Contains<IQueue<PacketEventArgs>>(item))
{
this.container.Add(item);
}
}
开发者ID:sandalkuilang,项目名称:texto,代码行数:7,代码来源:WorkerPoolManager.cs
示例16: DistributeMessageEventArgs
public DistributeMessageEventArgs(PipelineEvent pipelineEvent, IQueue destinationQueue,
TransportMessage transportMessage)
: base(pipelineEvent)
{
DestinationQueue = destinationQueue;
TransportMessage = transportMessage;
}
开发者ID:nnyamhon,项目名称:shuttle-esb,代码行数:7,代码来源:DistributeMessageEventArgs.cs
示例17: ReceivePipelineExceptionModule
public ReceivePipelineExceptionModule(IQueue inboxWorkQueue)
{
Guard.AgainstNull(inboxWorkQueue, "inboxWorkQueue");
this.inboxWorkQueue = inboxWorkQueue;
log = Log.For(this);
}
开发者ID:nnyamhon,项目名称:shuttle-esb,代码行数:8,代码来源:ReceivePipelineExceptionModule.cs
示例18: MyAppElasticConfiguration
public MyAppElasticConfiguration(IQueue<WorkItemData> workItemQueue, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory) : base(workItemQueue, cacheClient, messageBus, loggerFactory) {
AddIndex(Identities = new IdentityIndex(this));
AddIndex(Employees = new EmployeeIndex(this));
AddIndex(MonthlyEmployees = new MonthlyEmployeeIndex(this, 1));
AddIndex(DailyLogEvents = new DailyLogEventIndex(this));
AddIndex(MonthlyLogEvents = new MonthlyLogEventIndex(this));
AddIndex(ParentChild = new ParentChildIndex(this));
}
开发者ID:exceptionless,项目名称:Foundatio.Repositories,代码行数:8,代码来源:MyAppElasticConfiguration.cs
示例19: ResolvedQueue
public ResolvedQueue(IQueue queue, Uri uri)
{
Guard.AgainstNull(queue,"queue");
Guard.AgainstNull(uri, "uri");
_queue = queue;
Uri = uri;
}
开发者ID:gaoshilin,项目名称:shuttle-esb-core,代码行数:8,代码来源:ResolvedQueue.cs
示例20: 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
注:本文中的IQueue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论