public void Start()
{
AssertNotDisposedOrDisposing();
if (wasStarted)
throw new InvalidOperationException("The Start method may not be invoked more than once.");
receiver = new Receiver(endpoint, enableEndpointPortAutoSelection, AcceptMessages);
receiver.Start();
queuedMessagesSender = new QueuedMessagesSender(queueStorage, this);
sendingThread = new Thread(queuedMessagesSender.Send)
{
IsBackground = true,
Name = "Rhino Queue Sender Thread for " + path
};
sendingThread.Start();
purgeOldDataTimer = new Timer(_ => PurgeOldData(), null,
TimeSpan.FromMinutes(3),
TimeSpan.FromMinutes(3));
wasStarted = true;
}