Dereference pointers when generating getters for pointer variables.
Otherwise, the managed instance would point to the pointer itself
rather than the object at the native instance's address.
* Generator: Customization for const char[]
Allow the user to choose whether `const char[]` should be marshalled as
`string` or a normal `char` array in C#.
A new option `MarshalConstCharArrayAsString` is added, and is `true`
by default.
This helps in situations where the original C++ API distinguishes
between C-strings and char arrays using the two different notations.
* CSharpMarshal: Fix unknown length array marshal
For unknown length arrays, also run a conversion loop if the primitive
type encountered needs conversion (e.g. `char` to `sbyte`).
* CSharpTypePrinter: Fix for boolean arrays
- Expression generation for `ConstructorReference` now also recursively
calls `VisitExpression` for the argument if only one argument is
detected. This allows correct overload generation for functions taking
a variable as the default parameter value.
- Default parameters of pointer-to-enumeration types are now correctly
generated similar to primitive types.
* CSharpExpressionPrinter: Recurse into operands
Recursively call `VisitExpression` on the LHS and RHS of a binary
operator expression. This fixes the generation for complex default
parameters involving things other than two enumeration members.
* CSharpSources: Use `const` when possible
Generate `const` instead of `static` members when possible.
This allows generated members to be used when compile-time constants are
required, such as default parameters.
* dont generate GetInstance on classes with disabled NativeToManaged map
* disable vtable hooking for classes with disabled ManagedToNative
* throw exception when trying to inherit from class with disabled NativeToManaged map
* on MS abi call destructor on copy-by-value arguments after call to c# function
* add tests for destructor call on call by value from c++ to c#
* copy-by-value destructor call using Dispose() instead of Internal.dtor to handle destructors in base class