Skip to content
← Back

src/semantic/dotnet/type_source.ghul

1
@@IF.dotnet()
2
3
namespace Semantic.DotNet is
4
use TYPE = System.Type
5
6
use Collections.Iterable
7
use Collections.List
8
use Collections.MAP
9
use Collections.LIST
10
11
trait TypeSource is
12
on_start(callback: () -> void)
13
14
// assume assembly is System.Runtime:
15
get_type(type_name: string) -> TYPE
16
17
// use assembly_name if non-null, otherwise assume assembly is System.Runtime:
18
get_type(assembly_name: string?, type_name: string) -> TYPE
19
20
// assume assembly is System.Runtime:
21
get_types(type_names: Iterable[string]) -> List[TYPE]
22
23
// use assembly_name if non-null, otherwise assume assembly is System.Runtime:
24
get_types(assembly_and_type_names: Iterable[(assembly_name: string, type_name: string)]) -> List[TYPE]
25
26
// The nullability bytes for each interface `declaring_type`
27
// implements directly, keyed by `INTERFACE_NULLABILITY.key_for`'s
28
// reduction of the interface's own `Type` — see that class for
29
// why this can't be answered through ordinary reflection. Empty
30
// when there's nothing to say.
31
interface_nullability_bytes(declaring_type: TYPE) -> MAP[TYPE,LIST[int]]
32
si
33
si