diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-16 17:22:27 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-16 17:22:27 +0200 |
commit | eeaa9124af0cf6b66acd70f003482eecdd997a4a (patch) | |
tree | cab31adcbc1200e5555e9ae28d5e90d38f873468 | |
parent | 0dbe01483a902c49ecedf4fd36b74353424145a5 (diff) |
C# API: Hide method bind fields from debugger
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index bcf08026bc..f4c3033d19 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -646,8 +646,11 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str List<String> output; output.push_back("using System;\n"); // IntPtr + output.push_back("using System.Diagnostics;\n"); // DebuggerBrowsable + output.push_back("\n#pragma warning disable CS1591 // Disable warning: " "'Missing XML comment for publicly visible type or member'\n"); + output.push_back("\nnamespace " BINDINGS_NAMESPACE "\n" OPEN_BLOCK); const DocData::ClassDoc *class_doc = itype.class_doc; @@ -1086,7 +1089,7 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf // Generate method { if (!p_imethod.is_virtual && !p_imethod.requires_object_call) { - p_output.push_back(MEMBER_BEGIN "private static IntPtr "); + p_output.push_back(MEMBER_BEGIN "[DebuggerBrowsable(DebuggerBrowsableState.Never)]" MEMBER_BEGIN "private static IntPtr "); p_output.push_back(method_bind_field + " = Object." ICALL_GET_METHODBIND "(" BINDINGS_NATIVE_NAME_FIELD ", \""); p_output.push_back(p_imethod.name); p_output.push_back("\");\n"); |