From af1b1ec6bab0969c96c5b4ab835e6aac9d66705a Mon Sep 17 00:00:00 2001 From: Savorboard Date: Wed, 11 Apr 2018 18:15:23 +0800 Subject: [PATCH] refactor diagnostics --- .../DiagnosticListenerExtensions.cs | 144 ++++++++---------- .../Diagnostics/EventData.Broker.Consume.cs | 15 +- .../EventData.Broker.ConsumeEnd.cs | 16 +- .../EventData.Broker.ConsumeError.cs | 18 ++- .../Diagnostics/EventData.Broker.Publish.cs | 15 +- .../EventData.Broker.PublishEnd.cs | 16 +- .../EventData.Broker.PublishError.cs | 18 ++- .../Diagnostics/EventData.Broker.cs | 26 ++-- .../Diagnostics/EventData.SubscriberInvoke.cs | 31 ++-- .../EventData.SubscriberInvokeEnd.cs | 11 +- .../EventData.SubscriberInvokeError.cs | 11 +- src/DotNetCore.CAP/Diagnostics/EventData.cs | 7 +- .../Diagnostics/IErrorEventData.cs | 9 +- 13 files changed, 178 insertions(+), 159 deletions(-) diff --git a/src/DotNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs b/src/DotNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs index b9b5ba4..154309f 100644 --- a/src/DotNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs +++ b/src/DotNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; using System.Diagnostics; using System.Runtime.CompilerServices; using DotNetCore.CAP.Internal; @@ -23,21 +26,25 @@ namespace DotNetCore.CAP.Diagnostics public const string CapAfterPublish = CapPrefix + nameof(WritePublishAfter); public const string CapErrorPublish = CapPrefix + nameof(WritePublishError); - public const string CapBeforeReceiveMessageStore = CapPrefix + nameof(WriteReceiveMessageStoreBefore); - public const string CapAfterReceiveMessageStore = CapPrefix + nameof(WriteReceiveMessageStoreAfter); - public const string CapErrorReceiveMessageStore = CapPrefix + nameof(WriteReceiveMessageStoreError); + public const string CapBeforeConsume = CapPrefix + nameof(WriteConsumeBefore); + public const string CapAfterConsume = CapPrefix + nameof(WriteConsumeAfter); + public const string CapErrorConsume = CapPrefix + nameof(WriteConsumeError); + + public const string CapBeforeSubscriberInvoke = CapPrefix + nameof(WriteSubscriberInvokeBefore); + public const string CapAfterSubscriberInvoke = CapPrefix + nameof(WriteSubscriberInvokeAfter); + public const string CapErrorSubscriberInvoke = CapPrefix + nameof(WriteSubscriberInvokeError); - public const string CapBeforeConsumerInvoke = CapPrefix + nameof(WriteConsumerInvokeBefore); - public const string CapAfterConsumerInvoke = CapPrefix + nameof(WriteConsumerInvokeAfter); - public const string CapErrorConsumerInvoke = CapPrefix + nameof(WriteConsumerInvokeError); - public static Guid WritePublishMessageStoreBefore(this DiagnosticListener @this, + //============================================================================ + //==================== Before publish store message ==================== + //============================================================================ + public static Guid WritePublishMessageStoreBefore(this DiagnosticListener @this, CapPublishedMessage message, [CallerMemberName] string operation = "") { if (@this.IsEnabled(CapBeforePublishMessageStore)) { - Guid operationId = Guid.NewGuid(); + var operationId = Guid.NewGuid(); @this.Write(CapBeforePublishMessageStore, new { @@ -49,6 +56,7 @@ namespace DotNetCore.CAP.Diagnostics return operationId; } + return Guid.Empty; } @@ -73,7 +81,7 @@ namespace DotNetCore.CAP.Diagnostics public static void WritePublishMessageStoreError(this DiagnosticListener @this, Guid operationId, - CapPublishedMessage message, + CapPublishedMessage message, Exception ex, [CallerMemberName] string operation = "") { @@ -91,143 +99,112 @@ namespace DotNetCore.CAP.Diagnostics } } - public static Guid WritePublishBefore(this DiagnosticListener @this, - string topic, - string body, - string brokerAddress, - [CallerMemberName] string operation = "") + + //============================================================================ + //==================== Publish ==================== + //============================================================================ + public static void WritePublishBefore(this DiagnosticListener @this, BrokerPublishEventData eventData) { if (@this.IsEnabled(CapBeforePublish)) { - Guid operationId = Guid.NewGuid(); - - @this.Write(CapBeforePublish, new BrokerPublishEventData(operationId, operation, brokerAddress, topic, body, DateTimeOffset.UtcNow)); - - return operationId; + @this.Write(CapBeforePublish, eventData); } - return Guid.Empty; } - public static void WritePublishAfter(this DiagnosticListener @this, - Guid operationId, - string topic, - string body, - string brokerAddress, - DateTimeOffset startTime, - TimeSpan duration, - [CallerMemberName] string operation = "") + public static void WritePublishAfter(this DiagnosticListener @this, BrokerPublishEndEventData eventData) { if (@this.IsEnabled(CapAfterPublish)) { - @this.Write(CapAfterPublish, new BrokerPublishEndEventData(operationId, operation, brokerAddress, topic, body, startTime, duration)); + @this.Write(CapAfterPublish, eventData); } } - public static void WritePublishError(this DiagnosticListener @this, - Guid operationId, - string topic, - string body, - string brokerAddress, - Exception ex, - DateTimeOffset startTime, - TimeSpan duration, - [CallerMemberName] string operation = "") + public static void WritePublishError(this DiagnosticListener @this, BrokerPublishErrorEventData eventData) { if (@this.IsEnabled(CapErrorPublish)) { - @this.Write(CapErrorPublish, new BrokerPublishErrorEventData(operationId, operation, brokerAddress, topic, body, ex, startTime, duration)); + @this.Write(CapErrorPublish, eventData); } } - public static Guid WriteReceiveMessageStoreBefore(this DiagnosticListener @this, - string topic, - string body, - string groupName, - [CallerMemberName] string operation = "") + + //============================================================================ + //==================== Consume ==================== + //============================================================================ + public static Guid WriteConsumeBefore(this DiagnosticListener @this, BrokerConsumeEventData eventData) { - if (@this.IsEnabled(CapBeforeReceiveMessageStore)) + if (@this.IsEnabled(CapBeforeConsume)) { - Guid operationId = Guid.NewGuid(); - - @this.Write(CapBeforePublish, new BrokerConsumeEventData(operationId, operation, groupName, topic, body, DateTimeOffset.UtcNow)); - - return operationId; + @this.Write(CapBeforeConsume, eventData); } + return Guid.Empty; } - public static void WriteReceiveMessageStoreAfter(this DiagnosticListener @this, - Guid operationId, - string topic, - string body, - string groupName, - DateTimeOffset startTime, - TimeSpan duration, - [CallerMemberName] string operation = "") + public static void WriteConsumeAfter(this DiagnosticListener @this, BrokerConsumeEndEventData eventData) { - if (@this.IsEnabled(CapAfterReceiveMessageStore)) + if (@this.IsEnabled(CapAfterConsume)) { - @this.Write(CapAfterPublish, new BrokerConsumeEndEventData(operationId, operation, groupName, topic, body, startTime, duration)); + @this.Write(CapAfterConsume, eventData); } } - public static void WriteReceiveMessageStoreError(this DiagnosticListener @this, - Guid operationId, - string topic, - string body, - string groupName, - Exception ex, - DateTimeOffset startTime, - TimeSpan duration, - [CallerMemberName] string operation = "") + public static void WriteConsumeError(this DiagnosticListener @this, BrokerConsumeErrorEventData eventData) { - if (@this.IsEnabled(CapErrorReceiveMessageStore)) + if (@this.IsEnabled(CapErrorConsume)) { - @this.Write(CapErrorPublish, new BrokerConsumeErrorEventData(operationId, operation, groupName, topic, body, ex, startTime, duration)); + @this.Write(CapErrorConsume, eventData); } } - public static Guid WriteConsumerInvokeBefore(this DiagnosticListener @this, + + //============================================================================ + //==================== SubscriberInvoke ==================== + //============================================================================ + public static Guid WriteSubscriberInvokeBefore(this DiagnosticListener @this, ConsumerContext context, [CallerMemberName] string operation = "") { - if (@this.IsEnabled(CapBeforeConsumerInvoke)) + if (@this.IsEnabled(CapBeforeSubscriberInvoke)) { - Guid operationId = Guid.NewGuid(); + var operationId = Guid.NewGuid(); var methodName = context.ConsumerDescriptor.MethodInfo.Name; var subscribeName = context.ConsumerDescriptor.Attribute.Name; var subscribeGroup = context.ConsumerDescriptor.Attribute.Group; var parameterValues = context.DeliverMessage.Content; - @this.Write(CapBeforePublish, new SubscriberInvokeEventData(operationId, operation, methodName, subscribeName, + @this.Write(CapBeforePublish, new SubscriberInvokeEventData(operationId, operation, methodName, + subscribeName, subscribeGroup, parameterValues, DateTimeOffset.UtcNow)); return operationId; } + return Guid.Empty; } - public static void WriteConsumerInvokeAfter(this DiagnosticListener @this, + public static void WriteSubscriberInvokeAfter(this DiagnosticListener @this, Guid operationId, ConsumerContext context, DateTimeOffset startTime, TimeSpan duration, [CallerMemberName] string operation = "") { - if (@this.IsEnabled(CapAfterConsumerInvoke)) + if (@this.IsEnabled(CapAfterSubscriberInvoke)) { var methodName = context.ConsumerDescriptor.MethodInfo.Name; var subscribeName = context.ConsumerDescriptor.Attribute.Name; var subscribeGroup = context.ConsumerDescriptor.Attribute.Group; var parameterValues = context.DeliverMessage.Content; - @this.Write(CapBeforePublish, new SubscriberInvokeEndEventData(operationId, operation, methodName, subscribeName, + @this.Write(CapBeforePublish, new SubscriberInvokeEndEventData(operationId, operation, methodName, + subscribeName, subscribeGroup, parameterValues, startTime, duration)); } } - public static void WriteConsumerInvokeError(this DiagnosticListener @this, + public static void WriteSubscriberInvokeError(this DiagnosticListener @this, Guid operationId, ConsumerContext context, Exception ex, @@ -235,16 +212,17 @@ namespace DotNetCore.CAP.Diagnostics TimeSpan duration, [CallerMemberName] string operation = "") { - if (@this.IsEnabled(CapErrorConsumerInvoke)) + if (@this.IsEnabled(CapErrorSubscriberInvoke)) { var methodName = context.ConsumerDescriptor.MethodInfo.Name; var subscribeName = context.ConsumerDescriptor.Attribute.Name; var subscribeGroup = context.ConsumerDescriptor.Attribute.Group; var parameterValues = context.DeliverMessage.Content; - @this.Write(CapBeforePublish, new SubscriberInvokeErrorEventData(operationId, operation, methodName, subscribeName, + @this.Write(CapBeforePublish, new SubscriberInvokeErrorEventData(operationId, operation, methodName, + subscribeName, subscribeGroup, parameterValues, ex, startTime, duration)); } } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs index c6e7454..b24b01a 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs @@ -1,16 +1,19 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerConsumeEventData : BrokerEventData { - public DateTimeOffset StartTime { get; } - - public BrokerConsumeEventData(Guid operationId, string operation, string groupName, + public BrokerConsumeEventData(Guid operationId, string operation, string brokerAddress, string brokerTopicName, string brokerTopicBody, DateTimeOffset startTime) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody) { StartTime = startTime; } + + public DateTimeOffset StartTime { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs index e6bbba9..013eace 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs @@ -1,16 +1,20 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerConsumeEndEventData : BrokerConsumeEventData { - public TimeSpan Duration { get; } - - public BrokerConsumeEndEventData(Guid operationId, string operation, string groupName, string brokerTopicName, + public BrokerConsumeEndEventData(Guid operationId, string operation, string brokerAddress, + string brokerTopicName, string brokerTopicBody, DateTimeOffset startTime, TimeSpan duration) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody, startTime) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody, startTime) { Duration = duration; } + + public TimeSpan Duration { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs index 36c1300..36af350 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs @@ -1,16 +1,20 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerConsumeErrorEventData : BrokerConsumeEndEventData, IErrorEventData { - public Exception Exception { get; } - - public BrokerConsumeErrorEventData(Guid operationId, string operation, string groupName, - string brokerTopicName, string brokerTopicBody, Exception exception, DateTimeOffset startTime, TimeSpan duration) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody, startTime, duration) + public BrokerConsumeErrorEventData(Guid operationId, string operation, string brokerAddress, + string brokerTopicName, string brokerTopicBody, Exception exception, DateTimeOffset startTime, + TimeSpan duration) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody, startTime, duration) { Exception = exception; } + + public Exception Exception { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs index b7f904b..320f956 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs @@ -1,16 +1,19 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerPublishEventData : BrokerEventData { - public DateTimeOffset StartTime { get; } - - public BrokerPublishEventData(Guid operationId, string operation, string groupName, + public BrokerPublishEventData(Guid operationId, string operation, string brokerAddress, string brokerTopicName, string brokerTopicBody, DateTimeOffset startTime) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody) { StartTime = startTime; } + + public DateTimeOffset StartTime { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs index e415647..bc3d0cb 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs @@ -1,16 +1,20 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerPublishEndEventData : BrokerPublishEventData { - public TimeSpan Duration { get; } - - public BrokerPublishEndEventData(Guid operationId, string operation, string groupName, string brokerTopicName, + public BrokerPublishEndEventData(Guid operationId, string operation, string brokerAddress, + string brokerTopicName, string brokerTopicBody, DateTimeOffset startTime, TimeSpan duration) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody, startTime) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody, startTime) { Duration = duration; } + + public TimeSpan Duration { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs index fa4f8cb..ec44e3b 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs @@ -1,16 +1,20 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerPublishErrorEventData : BrokerPublishEndEventData, IErrorEventData { - public Exception Exception { get; } - - public BrokerPublishErrorEventData(Guid operationId, string operation, string groupName, - string brokerTopicName, string brokerTopicBody, Exception exception, DateTimeOffset startTime, TimeSpan duration) - : base(operationId, operation, groupName, brokerTopicName, brokerTopicBody, startTime, duration) + public BrokerPublishErrorEventData(Guid operationId, string operation, string brokerAddress, + string brokerTopicName, string brokerTopicBody, Exception exception, DateTimeOffset startTime, + TimeSpan duration) + : base(operationId, operation, brokerAddress, brokerTopicName, brokerTopicBody, startTime, duration) { Exception = exception; } + + public Exception Exception { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs index eef7ac1..b0a6b20 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs @@ -1,22 +1,28 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class BrokerEventData : EventData { - public string GroupName { get; set; } - - public string BrokerTopicBody { get; set; } - - public string BrokerTopicName { get; set; } - - public BrokerEventData(Guid operationId, string operation, string groupName, + public BrokerEventData(Guid operationId, string operation, string brokerAddress, string brokerTopicName, string brokerTopicBody) : base(operationId, operation) { - GroupName = groupName; + Headers = new TracingHeaders(); + BrokerAddress = brokerAddress; BrokerTopicName = brokerTopicName; BrokerTopicBody = brokerTopicBody; } + + public TracingHeaders Headers { get; set; } + + public string BrokerAddress { get; set; } + + public string BrokerTopicBody { get; set; } + + public string BrokerTopicName { get; set; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs index 021fff9..2302eec 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs @@ -1,25 +1,18 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class SubscriberInvokeEventData : EventData { - public DateTimeOffset StartTime { get; } - - public string MethodName { get; set; } - - public string SubscribeName { get; set; } - - public string SubscribeGroup { get; set; } - - public string ParameterValues { get; set; } - public SubscriberInvokeEventData(Guid operationId, string operation, - string methodName, + string methodName, string subscribeName, string subscribeGroup, - string parameterValues, + string parameterValues, DateTimeOffset startTime) : base(operationId, operation) { @@ -29,5 +22,15 @@ namespace DotNetCore.CAP.Diagnostics ParameterValues = parameterValues; StartTime = startTime; } + + public DateTimeOffset StartTime { get; } + + public string MethodName { get; set; } + + public string SubscribeName { get; set; } + + public string SubscribeGroup { get; set; } + + public string ParameterValues { get; set; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs index 38358a7..2a24ca1 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs @@ -1,11 +1,12 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class SubscriberInvokeEndEventData : SubscriberInvokeEventData { - public TimeSpan Duration { get; } - public SubscriberInvokeEndEventData(Guid operationId, string operation, string methodName, string subscribeName, string subscribeGroup, string parameterValues, DateTimeOffset startTime, TimeSpan duration) @@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics { Duration = duration; } + + public TimeSpan Duration { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs index be7a361..005f70f 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs @@ -1,11 +1,12 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { public class SubscriberInvokeErrorEventData : SubscriberInvokeEndEventData, IErrorEventData { - public Exception Exception { get; } - public SubscriberInvokeErrorEventData(Guid operationId, string operation, string methodName, string subscribeName, string subscribeGroup, string parameterValues, Exception exception, DateTimeOffset startTime, TimeSpan duration) : base(operationId, operation, methodName, subscribeName, @@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics { Exception = exception; } + + public Exception Exception { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/EventData.cs b/src/DotNetCore.CAP/Diagnostics/EventData.cs index 94c01b8..b773780 100644 --- a/src/DotNetCore.CAP/Diagnostics/EventData.cs +++ b/src/DotNetCore.CAP/Diagnostics/EventData.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { @@ -14,4 +17,4 @@ namespace DotNetCore.CAP.Diagnostics public string Operation { get; set; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs b/src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs index 56c2278..e0217c6 100644 --- a/src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs +++ b/src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs @@ -1,6 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; namespace DotNetCore.CAP.Diagnostics { @@ -8,4 +9,4 @@ namespace DotNetCore.CAP.Diagnostics { Exception Exception { get; } } -} +} \ No newline at end of file