Split WoofWare.PawPrint.Domain into a new subtree (#41)

This commit is contained in:
Patrick Stevens
2025-06-04 20:13:16 +01:00
committed by GitHub
parent 15bae6f3aa
commit 19eb7c245d
26 changed files with 62 additions and 30 deletions

View File

@@ -0,0 +1,37 @@
namespace WoofWare.PawPrint
open System
open System.Reflection.Metadata
[<CustomEquality>]
[<CustomComparison>]
type ComparableTypeDefinitionHandle =
private
{
_Inner : TypeDefinitionHandle
}
override this.Equals (other) =
match other with
| :? ComparableTypeDefinitionHandle as other -> this._Inner.GetHashCode () = other._Inner.GetHashCode ()
| _ -> false
override this.GetHashCode () : int = this._Inner.GetHashCode ()
interface IComparable<ComparableTypeDefinitionHandle> with
member this.CompareTo (other : ComparableTypeDefinitionHandle) : int =
this._Inner.GetHashCode().CompareTo (other._Inner.GetHashCode ())
interface IComparable with
member this.CompareTo (other : obj) : int =
match other with
| :? ComparableTypeDefinitionHandle as other ->
(this :> IComparable<ComparableTypeDefinitionHandle>).CompareTo other
| _ -> failwith "invalid comparison"
static member Make (h : TypeDefinitionHandle) =
{
_Inner = h
}
member this.Get = this._Inner