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