title: Change the name of duplicated events in #region "Event implementation for <interface>" for Xamarin Android Binding library
body: <p>I'm attempting to create a Xamarin Binding Library for the <a href="https://github.com/button/button-android" rel="nofollow noreferrer">Android UseButton library</a>. I created my binding project, included the .aar and set Build Action = LibraryProjectZip. As was expected, a bunch of errors popped up and I've managed to get rid of most using the Metadata.xml file, except for a bunch that follow the same pattern:</p>
  <blockquote>
  <p>Error CS0102  The type 'CrossBridgeCommunicator' already contains a definition for 'WebViewDismiss'</p>
  </blockquote>
  <p>I checked the CrossBridgeCommunicator class, and found it has 2 copies of about 12 events. Here's a snippet of one of these duplicates</p>
  <pre><code>#region &quot;Event implementation for Com.Usebutton.Sdk.Internal.Bridge.BridgeMessageParser.IListener&quot;
  ...
  public event EventHandler WebViewDismiss {
      add {
          global::Java.Interop.EventHelper.AddEventHandler&lt;global::Com.Usebutton.Sdk.Internal.Bridge.BridgeMessageParser.IListener, global::Com.Usebutton.Sdk.Internal.Bridge.BridgeMessageParser.IListenerImplementor&gt;(
          ref weak_implementor___SetMainBridge,
          __CreateIListenerImplementor,
          __v =&gt; MainBridge = __v,
          __h =&gt; __h.OnWebViewDismissHandler += value);
      }
  ...
  }
  ...
  public event EventHandler WebViewDismiss {
      add {
          global::Java.Interop.EventHelper.AddEventHandler&lt;global::Com.Usebutton.Sdk.Internal.Bridge.BridgeMessageParser.IListener, global::Com.Usebutton.Sdk.Internal.Bridge.BridgeMessageParser.IListenerImplementor&gt;(
          ref weak_implementor___SetWidgetBridge,
          __CreateIListenerImplementor,
          __v =&gt; WidgetBridge = __v,
          __h =&gt; __h.OnWebViewDismissHandler += value);
      }
  ...
  }
  </code></pre>
  <p>The only difference between them is that they access different attributes in their bodies (the &quot;weak_implementor__&quot;). I checked the original class in a Java decompiler and it doesn't implement any of these events; in fact, it doesn't even implement the interface. What it does have are 2 fields of this interface type. I'm guessing Xamarin creates these methods for some reason, but I don't know why or how. They don't even appear on the api.xml (nor do the fields).</p>
  <p>I tried to change the name of the events using the Metadata.xml file, but, since these events don't even exist in the Java class, I don't know how to find them. I even tried to remove the fields using &quot;remove-node&quot;, but am getting the warning no nodes matched. Does anyone know how can I change these events' names? Again, they come from the same interface, but are created directly on the class that has 2 fields of the interface type.</p>
  <p>Thanks in advance.</p>