@@ -85,7 +85,7 @@ public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, Inter
85
85
86
86
AddInterfaceListenerEventsAndProperties ( tw , iface , target , name , setter ,
87
87
string . Format ( "__v => {0} = __v" , prop . Name ) ,
88
- string . Format ( "__v => {0} = null" , prop . Name ) , opt ) ;
88
+ string . Format ( "__v => {0} = null" , prop . Name ) , opt , prop . Getter ) ;
89
89
} else {
90
90
refs . Add ( method . Name ) ;
91
91
string rm = null ;
@@ -103,7 +103,7 @@ public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, Inter
103
103
104
104
AddInterfaceListenerEventsAndProperties ( tw , iface , target , name , method . Name ,
105
105
method . Name ,
106
- remove , opt ) ;
106
+ remove , opt , method ) ;
107
107
}
108
108
}
109
109
@@ -113,7 +113,7 @@ public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, Inter
113
113
tw . Methods . Add ( new CreateImplementorMethod ( iface , opt ) ) ;
114
114
}
115
115
116
- public static void AddInterfaceListenerEventsAndProperties ( TypeWriter tw , InterfaceGen iface , ClassGen target , string name , string connector_fmt , string add , string remove , CodeGenerationOptions opt )
116
+ public static void AddInterfaceListenerEventsAndProperties ( TypeWriter tw , InterfaceGen iface , ClassGen target , string name , string connector_fmt , string add , string remove , CodeGenerationOptions opt , Method setMethod )
117
117
{
118
118
if ( ! iface . IsValid )
119
119
return ;
@@ -128,11 +128,11 @@ public static void AddInterfaceListenerEventsAndProperties (TypeWriter tw, Inter
128
128
if ( target . ContainsName ( nameUnique ) )
129
129
nameUnique += "Event" ;
130
130
131
- AddInterfaceListenerEventOrProperty ( tw , iface , method , target , nameUnique , connector_fmt , add , remove , opt ) ;
131
+ AddInterfaceListenerEventOrProperty ( tw , iface , method , target , nameUnique , connector_fmt , add , remove , opt , setMethod ) ;
132
132
}
133
133
}
134
134
135
- public static void AddInterfaceListenerEventOrProperty ( TypeWriter tw , InterfaceGen iface , Method method , ClassGen target , string name , string connector_fmt , string add , string remove , CodeGenerationOptions opt )
135
+ public static void AddInterfaceListenerEventOrProperty ( TypeWriter tw , InterfaceGen iface , Method method , ClassGen target , string name , string connector_fmt , string add , string remove , CodeGenerationOptions opt , Method setMethod )
136
136
{
137
137
if ( method . EventName == string . Empty )
138
138
return ;
@@ -157,7 +157,7 @@ public static void AddInterfaceListenerEventOrProperty (TypeWriter tw, Interface
157
157
var mt = target . Methods . Where ( method => string . Compare ( method . Name , connector_fmt , StringComparison . OrdinalIgnoreCase ) == 0 && method . IsListenerConnector ) . FirstOrDefault ( ) ;
158
158
var hasHandlerArgument = mt != null && mt . IsListenerConnector && mt . Parameters . Count == 2 && mt . Parameters [ 1 ] . Type == "Android.OS.Handler" ;
159
159
160
- tw . Events . Add ( new InterfaceListenerEvent ( iface , name , nameSpec , full_delegate_name , connector_fmt , add , remove , hasHandlerArgument , opt ) ) ;
160
+ tw . Events . Add ( new InterfaceListenerEvent ( iface , setMethod , name , nameSpec , full_delegate_name , connector_fmt , add , remove , hasHandlerArgument , opt ) ) ;
161
161
}
162
162
} else {
163
163
if ( opt . GetSafeIdentifier ( name ) != name ) {
0 commit comments