From d442b24a0cf48698fc7fa780dc2032a4af7176b1 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 13 Oct 2015 17:53:00 +1000 Subject: [PATCH] A bit of code cleanup --- Octokit/Helpers/WebHookConfigComparer.cs | 17 +++++++++++++++++ Octokit/Models/Request/NewRepositoryWebHook.cs | 15 +-------------- Octokit/Octokit-Mono.csproj | 1 + Octokit/Octokit-MonoAndroid.csproj | 1 + Octokit/Octokit-Monotouch.csproj | 1 + Octokit/Octokit-Portable.csproj | 1 + Octokit/Octokit-netcore45.csproj | 1 + Octokit/Octokit.csproj | 1 + 8 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 Octokit/Helpers/WebHookConfigComparer.cs diff --git a/Octokit/Helpers/WebHookConfigComparer.cs b/Octokit/Helpers/WebHookConfigComparer.cs new file mode 100644 index 0000000000..4c71681554 --- /dev/null +++ b/Octokit/Helpers/WebHookConfigComparer.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace Octokit +{ + public class WebHookConfigComparer : IEqualityComparer> + { + public bool Equals(KeyValuePair x, KeyValuePair y) + { + return x.Key == y.Key; + } + + public int GetHashCode(KeyValuePair obj) + { + return obj.Key.GetHashCode(); + } + } +} diff --git a/Octokit/Models/Request/NewRepositoryWebHook.cs b/Octokit/Models/Request/NewRepositoryWebHook.cs index 3be98b99d5..36d0183296 100644 --- a/Octokit/Models/Request/NewRepositoryWebHook.cs +++ b/Octokit/Models/Request/NewRepositoryWebHook.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -145,16 +144,4 @@ public enum WebHookContentType Json } - public class WebHookConfigComparer : IEqualityComparer> - { - public bool Equals(KeyValuePair x, KeyValuePair y) - { - return x.Key == y.Key; - } - - public int GetHashCode(KeyValuePair obj) - { - return obj.Key.GetHashCode(); - } - } } diff --git a/Octokit/Octokit-Mono.csproj b/Octokit/Octokit-Mono.csproj index cb927b2003..d8e6769c58 100644 --- a/Octokit/Octokit-Mono.csproj +++ b/Octokit/Octokit-Mono.csproj @@ -405,6 +405,7 @@ + \ No newline at end of file diff --git a/Octokit/Octokit-MonoAndroid.csproj b/Octokit/Octokit-MonoAndroid.csproj index 9599667674..5e04f570f6 100644 --- a/Octokit/Octokit-MonoAndroid.csproj +++ b/Octokit/Octokit-MonoAndroid.csproj @@ -413,6 +413,7 @@ + \ No newline at end of file diff --git a/Octokit/Octokit-Monotouch.csproj b/Octokit/Octokit-Monotouch.csproj index 2d0774ee1c..2d28b5445e 100644 --- a/Octokit/Octokit-Monotouch.csproj +++ b/Octokit/Octokit-Monotouch.csproj @@ -409,6 +409,7 @@ + diff --git a/Octokit/Octokit-Portable.csproj b/Octokit/Octokit-Portable.csproj index 141510f607..b2ba5012d4 100644 --- a/Octokit/Octokit-Portable.csproj +++ b/Octokit/Octokit-Portable.csproj @@ -402,6 +402,7 @@ + diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index c396b336d2..46c9b8cc64 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -406,6 +406,7 @@ + diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 3c13b25731..45ed228b3d 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -83,6 +83,7 @@ +