mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
C#: Add source generator for signals as events
Changed the signal declaration signal to: ``` // The following generates a MySignal event [Signal] public delegate void MySignalEventHandler(int param); ```
This commit is contained in:
parent
f033764ffe
commit
97713ff77a
31 changed files with 997 additions and 523 deletions
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Godot.SourceGenerators
|
||||
{
|
||||
internal struct MethodInfo
|
||||
{
|
||||
public MethodInfo(string name, PropertyInfo returnVal, MethodFlags flags,
|
||||
List<PropertyInfo>? arguments,
|
||||
List<string?>? defaultArguments)
|
||||
{
|
||||
Name = name;
|
||||
ReturnVal = returnVal;
|
||||
Flags = flags;
|
||||
Arguments = arguments;
|
||||
DefaultArguments = defaultArguments;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
public PropertyInfo ReturnVal { get; }
|
||||
public MethodFlags Flags { get; }
|
||||
public List<PropertyInfo>? Arguments { get; }
|
||||
public List<string?>? DefaultArguments { get; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue