Example #1
0
        public Task Handle(RemoveDatabusAttachment message, IMessageHandlerContext context)
        {
            var filePath = message.FilePath;

            // Code to clean up
            return(Task.FromResult(0));
        }
Example #2
0
        public Task Handle(RemoveDatabusAttachment message, IMessageHandlerContext context)
        {
            var filePath = message.FilePath;

            // Code to clean up
            return(Task.CompletedTask);
        }
Example #3
0
        public Task Handle(MessageWithLargePayload message, IMessageHandlerContext context)
        {
            var filePath         = Path.Combine(@"\\share\databus_attachments\", message.LargeBlob.Key);
            var removeAttachment = new RemoveDatabusAttachment
            {
                FilePath = filePath
            };
            var options = new SendOptions();

            options.RouteToThisEndpoint();
            options.DelayDeliveryWith(TimeSpan.FromDays(30));
            return(context.Send(removeAttachment, options));
        }