C#: Fixed delegate docstring logic

• No longer produces double-summaries
This commit is contained in:
Thaddeus Crews 2023-08-14 11:17:47 -05:00
parent c495eb5102
commit 4d7c07a132
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -2330,6 +2330,12 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
// Generate signal
{
bool is_parameterless = p_isignal.arguments.size() == 0;
// Delegate name is [SignalName]EventHandler
String delegate_name = is_parameterless ? "Action" : p_isignal.proxy_name + "EventHandler";
if (!is_parameterless) {
p_output.append(MEMBER_BEGIN "/// <summary>\n");
p_output.append(INDENT1 "/// ");
p_output.append("Represents the method that handles the ");
@ -2349,12 +2355,6 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
p_output.append("\")]");
}
bool is_parameterless = p_isignal.arguments.size() == 0;
// Delegate name is [SignalName]EventHandler
String delegate_name = is_parameterless ? "Action" : p_isignal.proxy_name + "EventHandler";
if (!is_parameterless) {
// Generate delegate
p_output.append(MEMBER_BEGIN "public delegate void ");
p_output.append(delegate_name);