diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh index a6e94ea2f6..1294bf01ed 100644 --- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh @@ -229,6 +229,12 @@ inline std::string managed_namespace(std::string const& ns) return escape_keyword(utils::remove_all(ns, '_')); } +inline std::string managed_name(std::string const& name, char separator='_') +{ + auto tokens = utils::split(name, separator); + return utils::to_pascal_case(tokens); +} + inline std::string managed_method_name(attributes::function_def const& f) { std::vector names = utils::split(f.name, '_'); @@ -244,18 +250,12 @@ inline std::string managed_method_name(attributes::function_def const& f) // Avoid clashing with System.Object.GetType if (candidate == "GetType" || candidate == "SetType") { - candidate.insert(3, f.klass.eolian_name); + candidate.insert(3, managed_name(f.klass.eolian_name)); } return candidate; } -inline std::string managed_name(std::string const& name, char separator='_') -{ - auto tokens = utils::split(name, separator); - return utils::to_pascal_case(tokens); -} - inline std::string full_managed_name(std::string const& name) { std::stringstream ss;