eolian_mono: Add underlying pointer to ToString

It'll make easier to track where an object is coming from.
This commit is contained in:
Lauro Moura 2018-01-22 18:12:33 -03:00
parent eaf41d9bce
commit 42f2aefbaf
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,11 @@ static bool generate_equals_method(OutputIterator sink, Context const &context)
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "return this.raw_handle.ToInt32();\n"
<< scope_tab << "}\n"
<< scope_tab << "///<summary>How native pointer in string representation.</summary>\n"
<< scope_tab << "public override String ToString()\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "return $\"{this.GetType().Name}@[{this.raw_handle.ToInt32():x}]\";\n"
<< scope_tab << "}\n"
).generate(sink, nullptr, context);
}