diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 51bb17c3a1..cded973d23 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -123,7 +123,8 @@ struct native_function_definition_generator self = ""; if(!as_generator - (indent << "private static " + (indent << "[SuppressMessage(\"Microsoft.Reliability\", \"CA2000:DisposeObjectsBeforeLosingScope\", Justification = \"The instantiated objects can be stored in the called Managed API method.\")]\n" + << indent << "private static " << eolian_mono::marshall_type(true) << " " << string << "(System.IntPtr obj, System.IntPtr pd" diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc index fd40e9982d..62eed11b2a 100644 --- a/src/bin/eolian_mono/eolian_mono.cc +++ b/src/bin/eolian_mono/eolian_mono.cc @@ -171,7 +171,8 @@ run(options_type const& opts) "using System.Collections.Generic;\n" "using System.Linq;\n" "using System.Threading;\n" - "using System.ComponentModel;\n") + "using System.ComponentModel;\n" + "using System.Diagnostics.CodeAnalysis;\n") .generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null())) { throw std::runtime_error("Failed to generate file preamble");