Skip to content

Commit

Permalink
A bit of code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hnrkndrssn committed Oct 13, 2015
1 parent aaf7567 commit b0ccf1a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
17 changes: 17 additions & 0 deletions Octokit/Helpers/WebHookConfigComparer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Collections.Generic;

namespace Octokit
{
public class WebHookConfigComparer : IEqualityComparer<KeyValuePair<string, string>>
{
public bool Equals(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
{
return x.Key == y.Key;
}

public int GetHashCode(KeyValuePair<string, string> obj)
{
return obj.Key.GetHashCode();
}
}
}
15 changes: 1 addition & 14 deletions Octokit/Models/Request/NewRepositoryWebHook.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

Expand Down Expand Up @@ -145,16 +144,4 @@ public enum WebHookContentType
Json
}

public class WebHookConfigComparer : IEqualityComparer<KeyValuePair<string, string>>
{
public bool Equals(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
{
return x.Key == y.Key;
}

public int GetHashCode(KeyValuePair<string, string> obj)
{
return obj.Key.GetHashCode();
}
}
}
1 change: 1 addition & 0 deletions Octokit/Octokit-Mono.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@
<Compile Include="Models\Common\Committer.cs" />
<Compile Include="Models\Request\NewRepositoryWebHook.cs" />
<Compile Include="Exceptions\RepositoryWebHookConfigException.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
1 change: 1 addition & 0 deletions Octokit/Octokit-MonoAndroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@
<Compile Include="Models\Common\Committer.cs" />
<Compile Include="Models\Request\NewRepositoryWebHook.cs" />
<Compile Include="Exceptions\RepositoryWebHookConfigException.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
</Project>
1 change: 1 addition & 0 deletions Octokit/Octokit-Monotouch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@
<Compile Include="Models\Common\Committer.cs" />
<Compile Include="Models\Request\NewRepositoryWebHook.cs" />
<Compile Include="Exceptions\RepositoryWebHookConfigException.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down
1 change: 1 addition & 0 deletions Octokit/Octokit-Portable.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<Compile Include="Models\Common\Committer.cs" />
<Compile Include="Models\Request\NewRepositoryWebHook.cs" />
<Compile Include="Exceptions\RepositoryWebHookConfigException.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
Expand Down
1 change: 1 addition & 0 deletions Octokit/Octokit-netcore45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@
<Compile Include="Models\Common\Committer.cs" />
<Compile Include="Models\Request\NewRepositoryWebHook.cs" />
<Compile Include="Exceptions\RepositoryWebHookConfigException.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="..\CustomDictionary.xml">
Expand Down
1 change: 1 addition & 0 deletions Octokit/Octokit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<Compile Include="Helpers\HttpClientExtensions.cs" />
<Compile Include="Helpers\PropertyOrField.cs" />
<Compile Include="Helpers\SerializeNullAttribute.cs" />
<Compile Include="Helpers\WebHookConfigComparer.cs" />
<Compile Include="Http\HttpMessageHandlerFactory.cs" />
<Compile Include="Http\IApiInfoProvider.cs" />
<Compile Include="Http\ProductHeaderValue.cs" />
Expand Down

0 comments on commit b0ccf1a

Please sign in to comment.