mirror of
https://github.com/godotengine/godot
synced 2024-09-15 22:10:09 +00:00
C#: Fixed delegate docstring logic
• No longer produces double-summaries
This commit is contained in:
parent
c495eb5102
commit
4d7c07a132
|
@ -2330,31 +2330,31 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
|
||||||
|
|
||||||
// Generate signal
|
// Generate signal
|
||||||
{
|
{
|
||||||
p_output.append(MEMBER_BEGIN "/// <summary>\n");
|
|
||||||
p_output.append(INDENT1 "/// ");
|
|
||||||
p_output.append("Represents the method that handles the ");
|
|
||||||
p_output.append("<see cref=\"" BINDINGS_NAMESPACE "." + p_itype.proxy_name + "." + p_isignal.proxy_name + "\"/>");
|
|
||||||
p_output.append(" event of a ");
|
|
||||||
p_output.append("<see cref=\"" BINDINGS_NAMESPACE "." + p_itype.proxy_name + "\"/>");
|
|
||||||
p_output.append(" class.\n");
|
|
||||||
p_output.append(INDENT1 "/// </summary>");
|
|
||||||
|
|
||||||
if (p_isignal.is_deprecated) {
|
|
||||||
if (p_isignal.deprecation_message.is_empty()) {
|
|
||||||
WARN_PRINT("An empty deprecation message is discouraged. Signal: '" + p_isignal.proxy_name + "'.");
|
|
||||||
}
|
|
||||||
|
|
||||||
p_output.append(MEMBER_BEGIN "[Obsolete(\"");
|
|
||||||
p_output.append(p_isignal.deprecation_message);
|
|
||||||
p_output.append("\")]");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_parameterless = p_isignal.arguments.size() == 0;
|
bool is_parameterless = p_isignal.arguments.size() == 0;
|
||||||
|
|
||||||
// Delegate name is [SignalName]EventHandler
|
// Delegate name is [SignalName]EventHandler
|
||||||
String delegate_name = is_parameterless ? "Action" : p_isignal.proxy_name + "EventHandler";
|
String delegate_name = is_parameterless ? "Action" : p_isignal.proxy_name + "EventHandler";
|
||||||
|
|
||||||
if (!is_parameterless) {
|
if (!is_parameterless) {
|
||||||
|
p_output.append(MEMBER_BEGIN "/// <summary>\n");
|
||||||
|
p_output.append(INDENT1 "/// ");
|
||||||
|
p_output.append("Represents the method that handles the ");
|
||||||
|
p_output.append("<see cref=\"" BINDINGS_NAMESPACE "." + p_itype.proxy_name + "." + p_isignal.proxy_name + "\"/>");
|
||||||
|
p_output.append(" event of a ");
|
||||||
|
p_output.append("<see cref=\"" BINDINGS_NAMESPACE "." + p_itype.proxy_name + "\"/>");
|
||||||
|
p_output.append(" class.\n");
|
||||||
|
p_output.append(INDENT1 "/// </summary>");
|
||||||
|
|
||||||
|
if (p_isignal.is_deprecated) {
|
||||||
|
if (p_isignal.deprecation_message.is_empty()) {
|
||||||
|
WARN_PRINT("An empty deprecation message is discouraged. Signal: '" + p_isignal.proxy_name + "'.");
|
||||||
|
}
|
||||||
|
|
||||||
|
p_output.append(MEMBER_BEGIN "[Obsolete(\"");
|
||||||
|
p_output.append(p_isignal.deprecation_message);
|
||||||
|
p_output.append("\")]");
|
||||||
|
}
|
||||||
|
|
||||||
// Generate delegate
|
// Generate delegate
|
||||||
p_output.append(MEMBER_BEGIN "public delegate void ");
|
p_output.append(MEMBER_BEGIN "public delegate void ");
|
||||||
p_output.append(delegate_name);
|
p_output.append(delegate_name);
|
||||||
|
|
Loading…
Reference in a new issue