Пример #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         MessageQueueingService.Dispose();
         SubscriptionTrackingService.Dispose();
     }
 }
Пример #2
0
        public async Task MalformedMessageFilesShouldPreventQueueCreation()
        {
            var queue = GivenUniqueQueueName();
            var path  = GivenExistingMalformedMessage(queue);

            var listener = new QueueListenerStub();
            await MessageQueueingService.CreateQueue(queue, listener);

            VerificationSink.AssertExactly <FilesystemEvent>(1, e =>
                                                             e.Type == FilesystemEventType.MessageFileFormatError &&
                                                             e.Path == path &&
                                                             e.Exception != null);
        }
Пример #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (Database != null && !string.IsNullOrWhiteSpace(DatabaseName))
            {
                try
                {
                    Database.Client.DropDatabase(DatabaseName);
                }
                catch (Exception)
                {
                    // Ignore
                }
            }

            if (disposing)
            {
                MessageQueueingService?.Dispose();
            }
        }