Skip to content

Commit

Permalink
Line ending normalization: Windows (CRLF)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakusaro committed Aug 23, 2013
1 parent 6de7bc2 commit 3e94bd1
Show file tree
Hide file tree
Showing 9 changed files with 1,328 additions and 1,323 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.cs text eol=crlf
*.sln text eol=crlf
*.csproj text eol=crlf
*.vsmdi text eol=crlf
74 changes: 37 additions & 37 deletions TerrariaApi.Server/HandlerRegistration.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
using System;
using System.Linq;

namespace TerrariaApi.Server
{
internal struct HandlerRegistration<ArgsType> where ArgsType: EventArgs
{
public TerrariaPlugin Registrator { get; set; }
public HookHandler<ArgsType> Handler { get; set; }
public int Priority { get; set; }

public override int GetHashCode()
{
return this.Registrator.GetHashCode() ^ this.Handler.GetHashCode() ^ this.Priority;
}

public override bool Equals(object obj)
{
if (!(obj is HandlerRegistration<ArgsType>))
return false;

HandlerRegistration<ArgsType> other = (HandlerRegistration<ArgsType>)obj;
return (
this.Registrator == other.Registrator &&
this.Handler.Equals(other.Handler));
}

public static bool operator ==(HandlerRegistration<ArgsType> a, HandlerRegistration<ArgsType> b)
{
return a.Equals(b);
}

public static bool operator !=(HandlerRegistration<ArgsType> a, HandlerRegistration<ArgsType> b)
{
return !a.Equals(b);
}
}
using System;
using System.Linq;

namespace TerrariaApi.Server
{
internal struct HandlerRegistration<ArgsType> where ArgsType: EventArgs
{
public TerrariaPlugin Registrator { get; set; }
public HookHandler<ArgsType> Handler { get; set; }
public int Priority { get; set; }

public override int GetHashCode()
{
return this.Registrator.GetHashCode() ^ this.Handler.GetHashCode() ^ this.Priority;
}

public override bool Equals(object obj)
{
if (!(obj is HandlerRegistration<ArgsType>))
return false;

HandlerRegistration<ArgsType> other = (HandlerRegistration<ArgsType>)obj;
return (
this.Registrator == other.Registrator &&
this.Handler.Equals(other.Handler));
}

public static bool operator ==(HandlerRegistration<ArgsType> a, HandlerRegistration<ArgsType> b)
{
return a.Equals(b);
}

public static bool operator !=(HandlerRegistration<ArgsType> a, HandlerRegistration<ArgsType> b)
{
return !a.Equals(b);
}
}
}
Loading

0 comments on commit 3e94bd1

Please sign in to comment.