java.interop
java.interop copied to clipboard
Binding private method can result in invalid C# code
Although it is debatable this was ever intended, if you give generator a private member it will bind it as private. This is a behavior that our users have used in the wild for various reasons and we do not wish to break.
- https://github.com/mattleibow/Microsoft-Band-SDK-Bindings/blob/master/Microsoft.Band/Microsoft.Band.Android/Transforms/Metadata.xml#L71
- https://github.com/mattleibow/Microsoft-Band-SDK-Bindings/blob/master/Microsoft.Band/Microsoft.Band.Android/Tiles/BandTheme.cs
This example provides public Color versions of the bound int methods.
While researching this I found a case where binding a private member generates the following invalid C# code:
private virtual unsafe void MyMethod ()