From 2bf1c10d85e781c1154499fb5e8a2d095b7bc426 Mon Sep 17 00:00:00 2001 From: Michael Friis Date: Tue, 26 Feb 2019 16:59:42 -0800 Subject: [PATCH 1/3] remove warning by not naming exception that's not used Signed-off-by: Michael Friis --- src/CloudNative.CloudEvents/HttpClientExtension.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CloudNative.CloudEvents/HttpClientExtension.cs b/src/CloudNative.CloudEvents/HttpClientExtension.cs index cb17c76..8914a71 100644 --- a/src/CloudNative.CloudEvents/HttpClientExtension.cs +++ b/src/CloudNative.CloudEvents/HttpClientExtension.cs @@ -116,7 +116,7 @@ namespace CloudNative.CloudEvents var response = await client.GetAsync(new Uri(uri)); return new HttpResponseMessage(response.StatusCode); } - catch (Exception e) + catch (Exception) { return new HttpResponseMessage(HttpStatusCode.InternalServerError); } @@ -175,7 +175,7 @@ namespace CloudNative.CloudEvents context.Response.Close(); return; } - catch (Exception e) + catch (Exception) { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; context.Response.Close(); From a03263b17d878dbbd83c5587ea164ff83d7cc799 Mon Sep 17 00:00:00 2001 From: Michael Friis Date: Tue, 26 Feb 2019 17:00:03 -0800 Subject: [PATCH 2/3] copy-pasta comments Signed-off-by: Michael Friis --- src/CloudNative.CloudEvents/HttpClientExtension.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CloudNative.CloudEvents/HttpClientExtension.cs b/src/CloudNative.CloudEvents/HttpClientExtension.cs index 8914a71..542c4ce 100644 --- a/src/CloudNative.CloudEvents/HttpClientExtension.cs +++ b/src/CloudNative.CloudEvents/HttpClientExtension.cs @@ -271,7 +271,7 @@ namespace CloudNative.CloudEvents /// /// Listener request /// List of extension instances - /// A CloudEvent instance or 'null' if the response message doesn't hold a CloudEvent + /// A CloudEvent instance or 'null' if the request message doesn't hold a CloudEvent public static CloudEvent ToCloudEvent(this HttpListenerRequest httpListenerRequest, params ICloudEventExtension[] extensions) { @@ -285,7 +285,7 @@ namespace CloudNative.CloudEvents /// Listener request /// /// List of extension instances - /// A CloudEvent instance or 'null' if the response message doesn't hold a CloudEvent + /// A CloudEvent instance or 'null' if the request message doesn't hold a CloudEvent public static CloudEvent ToCloudEvent(this HttpListenerRequest httpListenerRequest, ICloudEventFormatter formatter = null, params ICloudEventExtension[] extensions) @@ -370,7 +370,7 @@ namespace CloudNative.CloudEvents /// Listener request /// /// List of extension instances - /// A CloudEvent instance or 'null' if the response message doesn't hold a CloudEvent + /// A CloudEvent instance or 'null' if the request message doesn't hold a CloudEvent public static CloudEvent ToCloudEvent(this HttpRequestMessage httpListenerRequest, ICloudEventFormatter formatter = null, params ICloudEventExtension[] extensions) From edb1ea82813fb20c77bb16d14b91eb19abb7d47c Mon Sep 17 00:00:00 2001 From: Michael Friis Date: Tue, 26 Feb 2019 17:05:53 -0800 Subject: [PATCH 3/3] remove unused using Signed-off-by: Michael Friis --- samples/HttpSend/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/HttpSend/Program.cs b/samples/HttpSend/Program.cs index 904c494..a8a51eb 100644 --- a/samples/HttpSend/Program.cs +++ b/samples/HttpSend/Program.cs @@ -6,7 +6,6 @@ namespace HttpSend { using System; using System.ComponentModel.DataAnnotations; - using System.Net; using System.Net.Http; using System.Net.Mime; using System.Threading.Tasks;