Debian Codegraph @

modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GodotMemberData.cs

raw symbols SCIP
1 using System.Collections.Immutable;
2 using Microsoft.CodeAnalysis;
3
4 namespace Godot.SourceGenerators
5 {
6 public readonly struct GodotMethodData
7 {
8 public GodotMethodData(IMethodSymbol method, ImmutableArray<MarshalType> paramTypes,
9 ImmutableArray<ITypeSymbol> paramTypeSymbols, (MarshalType MarshalType, ITypeSymbol TypeSymbol)? retType)
10 {
11 Method = method;
12 ParamTypes = paramTypes;
13 ParamTypeSymbols = paramTypeSymbols;
14 RetType = retType;
15 }
16
17 public IMethodSymbol Method { get; }
18 public ImmutableArray<MarshalType> ParamTypes { get; }
19 public ImmutableArray<ITypeSymbol> ParamTypeSymbols { get; }
20 public (MarshalType MarshalType, ITypeSymbol TypeSymbol)? RetType { get; }
21 }
22
23 public readonly struct GodotSignalDelegateData
24 {
25 public GodotSignalDelegateData(string name, INamedTypeSymbol delegateSymbol, GodotMethodData invokeMethodData)
26 {
27 Name = name;
28 DelegateSymbol = delegateSymbol;
29 InvokeMethodData = invokeMethodData;
30 }
31
32 public string Name { get; }
33 public INamedTypeSymbol DelegateSymbol { get; }
34 public GodotMethodData InvokeMethodData { get; }
35 }
36
37 public readonly struct GodotPropertyData
38 {
39 public GodotPropertyData(IPropertySymbol propertySymbol, MarshalType type)
40 {
41 PropertySymbol = propertySymbol;
42 Type = type;
43 }
44
45 public IPropertySymbol PropertySymbol { get; }
46 public MarshalType Type { get; }
47 }
48
49 public readonly struct GodotFieldData
50 {
51 public GodotFieldData(IFieldSymbol fieldSymbol, MarshalType type)
52 {
53 FieldSymbol = fieldSymbol;
54 Type = type;
55 }
56
57 public IFieldSymbol FieldSymbol { get; }
58 public MarshalType Type { get; }
59 }
60
61 public struct GodotPropertyOrFieldData
62 {
63 public GodotPropertyOrFieldData(ISymbol symbol, MarshalType type)
64 {
65 Symbol = symbol;
66 Type = type;
67 }
68
69 public GodotPropertyOrFieldData(GodotPropertyData propertyData)
70 : this(propertyData.PropertySymbol, propertyData.Type)
71 {
72 }
73
74 public GodotPropertyOrFieldData(GodotFieldData fieldData)
75 : this(fieldData.FieldSymbol, fieldData.Type)
76 {
77 }
78
79 public ISymbol Symbol { get; }
80 public MarshalType Type { get; }
81 }
82 }