public static void NotifyResourceUsageCompleted(this ConsumeContext context, Guid dispatchId, Uri resource, DateTime timestamp, TimeSpan duration)
        {
            if (timestamp.Kind == DateTimeKind.Local)
                timestamp = timestamp.ToUniversalTime();

            var @event = new ResourceUsageCompletedEvent(resource, dispatchId, timestamp, duration);

            context.Publish(@event);
        }
Esempio n. 2
0
        public static void NotifyResourceUsageCompleted(this ConsumeContext context, Guid dispatchId, Uri resource, DateTime timestamp, TimeSpan duration)
        {
            if (timestamp.Kind == DateTimeKind.Local)
            {
                timestamp = timestamp.ToUniversalTime();
            }

            var @event = new ResourceUsageCompletedEvent(resource, dispatchId, timestamp, duration);

            context.Publish(@event);
        }
Esempio n. 3
0
        public static void NotifyResourceUsageCompleted(this IServiceBus bus, Uri resource)
        {
            var @event = new ResourceUsageCompletedEvent(resource, DateTime.UtcNow, TimeSpan.Zero);

            bus.Publish(@event);
        }
        public static void NotifyResourceUsageCompleted(this IServiceBus bus, Uri resource)
        {
            var @event = new ResourceUsageCompletedEvent(resource, DateTime.UtcNow, TimeSpan.Zero);

            bus.Publish(@event);
        }