mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-08 07:28:40 +00:00
More ToString (#46)
This commit is contained in:
@@ -244,6 +244,12 @@ type TypeResolutionResult =
|
|||||||
| FirstLoadAssy of WoofWare.PawPrint.AssemblyReference
|
| FirstLoadAssy of WoofWare.PawPrint.AssemblyReference
|
||||||
| Resolved of DumpedAssembly * TypeInfo<TypeDefn>
|
| Resolved of DumpedAssembly * TypeInfo<TypeDefn>
|
||||||
|
|
||||||
|
override this.ToString () : string =
|
||||||
|
match this with
|
||||||
|
| TypeResolutionResult.FirstLoadAssy a -> $"FirstLoadAssy(%s{a.Name.FullName})"
|
||||||
|
| TypeResolutionResult.Resolved (assy, ty) ->
|
||||||
|
$"Resolved(%s{assy.Name.FullName}: {string<TypeInfo<TypeDefn>> ty})"
|
||||||
|
|
||||||
[<RequireQualifiedAccess>]
|
[<RequireQualifiedAccess>]
|
||||||
module Assembly =
|
module Assembly =
|
||||||
let read (loggerFactory : ILoggerFactory) (originalPath : string option) (dllBytes : Stream) : DumpedAssembly =
|
let read (loggerFactory : ILoggerFactory) (originalPath : string option) (dllBytes : Stream) : DumpedAssembly =
|
||||||
|
@@ -81,17 +81,27 @@ type TypeInfo<'generic> =
|
|||||||
Events : EventDefn ImmutableArray
|
Events : EventDefn ImmutableArray
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override this.ToString () =
|
||||||
|
$"%s{this.Assembly.Name}.%s{this.Namespace}.%s{this.Name}"
|
||||||
|
|
||||||
type TypeInfoEval<'ret> =
|
type TypeInfoEval<'ret> =
|
||||||
abstract Eval<'a> : TypeInfo<'a> -> 'ret
|
abstract Eval<'a> : TypeInfo<'a> -> 'ret
|
||||||
|
|
||||||
type TypeInfoCrate =
|
type TypeInfoCrate =
|
||||||
abstract Apply<'ret> : TypeInfoEval<'ret> -> 'ret
|
abstract Apply<'ret> : TypeInfoEval<'ret> -> 'ret
|
||||||
|
abstract ToString : unit -> string
|
||||||
|
|
||||||
[<RequireQualifiedAccess>]
|
[<RequireQualifiedAccess>]
|
||||||
module TypeInfoCrate =
|
module TypeInfoCrate =
|
||||||
let make<'a> (t : TypeInfo<'a>) =
|
let make<'a> (t : TypeInfo<'a>) =
|
||||||
{ new TypeInfoCrate with
|
{ new TypeInfoCrate with
|
||||||
member _.Apply e = e.Eval t
|
member _.Apply e = e.Eval t
|
||||||
|
|
||||||
|
member this.ToString () =
|
||||||
|
{ new TypeInfoEval<_> with
|
||||||
|
member _.Eval this = string<TypeInfo<_>> this
|
||||||
|
}
|
||||||
|
|> this.Apply
|
||||||
}
|
}
|
||||||
|
|
||||||
type BaseClassTypes<'corelib> =
|
type BaseClassTypes<'corelib> =
|
||||||
|
Reference in New Issue
Block a user