godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators
Ignacio Roldán Etcheverry 17b2838f39 C#: Cleanup Variant marshaling code in source/bindings generators
This change aims to reduce the number of places that need to be changed
when adding or editing a Godot type to the bindings.

Since the addition of `Variant.From<T>/As<T>` and
`VariantUtils.CreateFrom<T>/ConvertTo<T>`, we can now replace a lot of
the previous code in the bindings generator and the source generators
that specify these conversions for each type manually.

The only exceptions are the generic Godot collections (`Array<T>` and
`Dictionary<TKey, TValue>`) which still use the old version, as that
one cannot be matched by our new conversion methods (limitation in the
language with generics, forcing us to use delegate pointers).

The cleanup applies to:

- Bindings generator:
  - `TypeInterface.cs_variant_to_managed`
  - `TypeInterface.cs_managed_to_variant`
- Source generators:
  - `MarshalUtils.AppendNativeVariantToManagedExpr`
  - `MarshalUtils.AppendManagedToNativeVariantExpr`
  - `MarshalUtils.AppendVariantToManagedExpr`
  - `MarshalUtils.AppendManagedToVariantExpr`
2022-12-02 14:47:12 +01:00
..
Common.cs C#: Add `global::` namespace to generated source 2022-11-26 01:13:16 +01:00
EventHandlerSuffixSuppressor.cs C#: Suppress EventHandler suffix diagnostic for signals 2022-09-22 14:23:01 +02:00
ExtensionMethods.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
Godot.SourceGenerators.csproj C#: Make GodotSharp API a NuGet package 2022-08-22 03:36:51 +02:00
Godot.SourceGenerators.props C#/netcore: Add base desktop game export implementation 2022-08-22 03:36:51 +02:00
GodotClasses.cs Add MustBeVariant attribute and analyzer 2022-08-25 01:47:40 +02:00
GodotEnums.cs C#: Synchronize Godot enums with core 2022-11-19 01:54:23 +01:00
GodotMemberData.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
GodotPluginsInitializerGenerator.cs Use `.generated` suffix for generated C# code 2022-10-22 23:13:52 +02:00
MarshalType.cs C#: Re-introduce generic Godot Array and Dictionary 2022-08-22 03:36:52 +02:00
MarshalUtils.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
MethodInfo.cs Add `readonly` to C# methods and types that don't mutate 2022-11-14 20:32:20 +01:00
MustBeVariantAnalyzer.cs C#: Make MustBeVariantAnalyzer ignore OmittedTypeArgument 2022-09-06 18:51:45 +02:00
PropertyInfo.cs Add `readonly` to C# methods and types that don't mutate 2022-11-14 20:32:20 +01:00
ScriptMethodsGenerator.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
ScriptPathAttributeGenerator.cs C#: Add `global::` namespace to generated source 2022-11-26 01:13:16 +01:00
ScriptPropertiesGenerator.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
ScriptPropertyDefValGenerator.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
ScriptRegistrarGenerator.cs C#: Add initial implementation of source generator for script members 2022-08-22 03:36:51 +02:00
ScriptSerializationGenerator.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00
ScriptSignalsGenerator.cs C#: Cleanup Variant marshaling code in source/bindings generators 2022-12-02 14:47:12 +01:00