Debian Codegraph @

modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/Methods_ScriptMethods.generated.cs

raw symbols SCIP
1 using Godot;
2 using Godot.NativeInterop;
3
4 partial class Methods
5 {
6 #pragma warning disable CS0109 // Disable warning about redundant 'new' keyword
7 /// <summary>
8 /// Cached StringNames for the methods contained in this class, for fast lookup.
9 /// </summary>
10 public new class MethodName : global::Godot.GodotObject.MethodName {
11 /// <summary>
12 /// Cached name for the 'MethodWithOverload' method.
13 /// </summary>
14 public new static readonly global::Godot.StringName @MethodWithOverload = "MethodWithOverload";
15 }
16 /// <summary>
17 /// Get the method information for all the methods declared in this class.
18 /// This method is used by Godot to register the available methods in the editor.
19 /// Do not call this method.
20 /// </summary>
21 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
22 internal new static global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo> GetGodotMethodList()
23 {
24 var methods = new global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>(3);
25 methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: null, defaultArguments: null));
26 methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: new() { new(type: (global::Godot.Variant.Type)2, name: "a", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), }, defaultArguments: null));
27 methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: new() { new(type: (global::Godot.Variant.Type)2, name: "a", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), new(type: (global::Godot.Variant.Type)2, name: "b", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), }, defaultArguments: null));
28 return methods;
29 }
30 #pragma warning restore CS0109
31 /// <inheritdoc/>
32 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
33 protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
34 {
35 if (method == MethodName.@MethodWithOverload && args.Count == 0) {
36 @MethodWithOverload();
37 ret = default;
38 return true;
39 }
40 if (method == MethodName.@MethodWithOverload && args.Count == 1) {
41 @MethodWithOverload(global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[0]));
42 ret = default;
43 return true;
44 }
45 if (method == MethodName.@MethodWithOverload && args.Count == 2) {
46 @MethodWithOverload(global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[0]), global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[1]));
47 ret = default;
48 return true;
49 }
50 return base.InvokeGodotClassMethod(method, args, out ret);
51 }
52 /// <inheritdoc/>
53 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
54 protected override bool HasGodotClassMethod(in godot_string_name method)
55 {
56 if (method == MethodName.@MethodWithOverload) {
57 return true;
58 }
59 return base.HasGodotClassMethod(method);
60 }
61 }