godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators
Raul Santos 5815d1c8c8
Improve handling of generic C# types
- Create CSharpScript for generic C# types.
  - `ScriptPathAttributeGenerator` registers the path for the generic type definition.
  - `ScriptManagerBridge` lookup uses the generic type definition that was registered by the generator.
  - Constructed generic types use a virtual `csharp://` path so they can be registered in the map and loaded as if there was a different file for each constructed type, even though they all share the same real path.
  - This allows getting the base type for a C# type that derives from a generic type.
- Shows base scripts in the _Add Node_ and _Create Resource_ dialogs even when they are generic types.
  - `get_global_class_name` implementation was moved to C# and now always returns the base type even if the script is not a global class (this behavior matches GDScript).
- Create `CSharpScript::TypeInfo` struct to hold all the type information about the C# type that corresponds to the `CSharpScript`, and use it as the parameter in `UpdateScriptClassInfo` to avoid adding more parameters.
2024-02-08 18:31:13 +01:00
..
CodeAnalysisAttributes.cs Clean a bunch of C# warnings 2024-01-26 09:38:33 +01:00
Common.cs
EventHandlerSuffixSuppressor.cs
ExtensionMethods.cs
GlobalClassAnalyzer.cs
Godot.SourceGenerators.csproj C#: Fix to allow usage of [MustBeVariant] in generic typed attributes 2024-01-21 22:29:29 +01:00
Godot.SourceGenerators.props
GodotClasses.cs
GodotEnums.cs
GodotMemberData.cs
GodotPluginsInitializerGenerator.cs
Helper.cs Clean a bunch of C# warnings 2024-01-26 09:38:33 +01:00
MarshalType.cs
MarshalUtils.cs
MethodInfo.cs
MustBeVariantAnalyzer.cs Merge pull request #87518 from paulloz/dotnet/fix-warnings 2024-01-26 11:46:37 +01:00
PropertyInfo.cs
ScriptMethodsGenerator.cs Clean a bunch of C# warnings 2024-01-26 09:38:33 +01:00
ScriptPathAttributeGenerator.cs Improve handling of generic C# types 2024-02-08 18:31:13 +01:00
ScriptPropertiesGenerator.cs Clean a bunch of C# warnings 2024-01-26 09:38:33 +01:00
ScriptPropertyDefValGenerator.cs
ScriptRegistrarGenerator.cs
ScriptSerializationGenerator.cs
ScriptSignalsGenerator.cs Clean a bunch of C# warnings 2024-01-26 09:38:33 +01:00