本文整理汇总了C#中QueueManager类的典型用法代码示例。如果您正苦于以下问题:C# QueueManager类的具体用法?C# QueueManager怎么用?C# QueueManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueueManager类属于命名空间,在下文中一共展示了QueueManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EnsureStorage
protected void EnsureStorage( string connectionString )
{
bool runInstall = CreateDatabaseIfNotExists( connectionString );
if( runInstall )
{
SchemaManager.Install( connectionString );
}
var storage = new QueueStorage( connectionString );
try
{
storage.Initialize();
}
catch(Exception ex)
{
if ( !( ex is InvalidOperationException ) && !( ex is SqlException ) )
{
throw;
}
SchemaManager.Install( connectionString );
storage.Initialize();
}
using ( var qManager = new QueueManager( connectionString, port: 2204 ) )
{
qManager.ConfigureEndPoint();
}
StorageUtil.PurgeAll( connectionString );
}
开发者ID:alanta,项目名称:servicebroker-queues,代码行数:33,代码来源:QueueTest.cs
示例2: StartingRhinoQueues
public StartingRhinoQueues()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), "test.esent");
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:7,代码来源:StartingRhinoQueues.cs
示例3: AutoSelectPort
public AutoSelectPort()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
queueManager = new QueueManager(endPoint, "test.esent");
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:7,代码来源:AutoSelectPort.cs
示例4: MessageSent_EventIsRaised
public void MessageSent_EventIsRaised()
{
using (var sender = SetupSender())
{
sender.MessageSent += RecordMessageEvent;
using (var receiver = new QueueManager("localhost", "test2.esent"))
{
receiver.CreateQueues("h");
receiver.Start();
using (var tx = new TransactionScope())
{
sender.Send(
new Uri("file://localhost/h"),
new MessagePayload
{
Data = new byte[] { 1, 2, 4, 5 }
});
tx.Complete();
}
sender.WaitForAllMessagesToBeSent();
}
sender.MessageSent -= RecordMessageEvent;
}
Assert.NotNull(_messageEventArgs);
Assert.Equal("localhost", _messageEventArgs.Endpoint);
Assert.Equal("h", _messageEventArgs.Message.Queue);
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:31,代码来源:RaisingSendEvents.cs
示例5: Start
public bool Start(HostControl hostControl)
{
_logger.Info("Producer service starting");
_queueManager = new QueueManager(_queueName, _svcBusConnection);
_queueManager.Start().Wait();
_task = StartProducing();
return true;
}
开发者ID:Gayuraj,项目名称:CompetingConsumersAzure.Topshelf,代码行数:8,代码来源:Producer.cs
示例6: QueueIsAsync
public QueueIsAsync()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
_queueManager = new QueueManager("localhost", "test.esent");
_queueManager.CreateQueues("h");
_queueManager.Start();
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:8,代码来源:QueueIsAsync.cs
示例7: QueueIsAsync
public QueueIsAsync()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), "test.esent");
queueManager.CreateQueues("h");
}
开发者ID:nkmajeti,项目名称:rhino-tools,代码行数:8,代码来源:QueueIsAsync.cs
示例8: Errors
public Errors()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
_sender = new QueueManager(null, "test.esent");
_sender.Start();
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:8,代码来源:Errors.cs
示例9: WhenPeekingMessages
public WhenPeekingMessages()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
_queueManager = new QueueManager("localhost", "test.esent");
_queueManager.CreateQueues("h");
_queueManager.Start();
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:8,代码来源:WhenPeekingMessages.cs
示例10: Errors
public Errors()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
sender = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), "test.esent");
sender.Start();
}
开发者ID:jalchr,项目名称:rhino-queues,代码行数:8,代码来源:Errors.cs
示例11: ReceivingFromRhinoQueue
public ReceivingFromRhinoQueue()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
_queueManager = new QueueManager("localhost", "test.esent");
_queueManager.CreateQueues("h");
_queueManager.Start();
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:8,代码来源:ReceivingFromRhinoQueue.cs
示例12: Enabling_performance_counters_without_existing_categories_throws_meaningful_error
public void Enabling_performance_counters_without_existing_categories_throws_meaningful_error()
{
PerformanceCounterCategoryCreation.DeletePerformanceCounters();
using (var queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), TEST_QUEUE_1))
{
Assert.Throws<ApplicationException>(() => queueManager.EnablePerformanceCounters());
}
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:9,代码来源:EnablingPerformanceCounters.cs
示例13: QueueManager
public static QueueManager QueueManager(string name = "test", string queue = "h")
{
var directory = string.Format("{0}.esent", name);
if (Directory.Exists(directory))
Directory.Delete(directory, true);
var queueManager = new QueueManager("localhost", directory);
queueManager.CreateQueues(queue);
return queueManager;
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:9,代码来源:ObjectMother.cs
示例14: GetInstance
public static QueueManager GetInstance()
{
if (queueManager == null)
{
queueManager = new QueueManager();
}
return queueManager;
}
开发者ID:issafram,项目名称:TeamDashboardKanban,代码行数:9,代码来源:QueueManager.cs
示例15: Enabling_performance_counters_after_queue_has_started_should_throw
public void Enabling_performance_counters_after_queue_has_started_should_throw()
{
Setup();
using (var queueManager = new QueueManager("localhost", TEST_QUEUE_1))
{
queueManager.Start();
Assert.Throws<InvalidOperationException>(() => queueManager.EnablePerformanceCounters());
}
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:9,代码来源:EnablingPerformanceCounters.cs
示例16: WhenPeekingMessages
public WhenPeekingMessages()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), "test.esent");
queueManager.CreateQueues("h");
queueManager.Start();
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:9,代码来源:WhenPeekingMessages.cs
示例17: ReceivingFromRhinoQueue
public ReceivingFromRhinoQueue()
{
if (Directory.Exists("test.esent"))
Directory.Delete("test.esent", true);
queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), "test.esent");
queueManager.CreateQueues("h");
queueManager.Start();
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:9,代码来源:ReceivingFromRhinoQueue.cs
示例18: After_enabling_performance_counters_changes_to_queue_state_should_be_reflected_in_counters
public void After_enabling_performance_counters_changes_to_queue_state_should_be_reflected_in_counters()
{
Setup();
using (var queueManager = new QueueManager("localhost", TEST_QUEUE_1))
{
queueManager.EnablePerformanceCounters();
EnqueueMessages(queueManager);
}
AssertAllCountersHaveCorrectValues();
}
开发者ID:BclEx,项目名称:rhino-esb,代码行数:10,代码来源:EnablingPerformanceCounters.cs
示例19: Enabling_performance_counters_after_queue_has_started_should_throw
public void Enabling_performance_counters_after_queue_has_started_should_throw()
{
Setup();
using (var queueManager = new QueueManager(new IPEndPoint(IPAddress.Loopback, 23456), TEST_QUEUE_1))
{
queueManager.Start();
Assert.Throws<InvalidOperationException>(() => queueManager.EnablePerformanceCounters());
}
}
开发者ID:hibernating-rhinos,项目名称:rhino-queues,代码行数:10,代码来源:EnablingPerformanceCounters.cs
示例20: Setup
public void Setup()
{
using (var tx = new TransactionScope())
{
receiver = ObjectMother.QueueManager("receiver", 4545, "uno");
receiver.Start();
tx.Complete();
}
}
开发者ID:jmptrader,项目名称:LightningQueues,代码行数:10,代码来源:FromRene.cs
注:本文中的QueueManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论