Skip to content

Commit 05bd481

Browse files
committed
Fix invoker interface.
1 parent 60e4e7d commit 05bd481

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tools/generator/SourceWriters/InterfaceInvokerClass.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ void AddMemberInvokers (InterfaceGen iface, HashSet<string> members, CodeGenerat
4646
{
4747
var add_char_enumerator = iface.FullName == "Java.Lang.ICharSequence";
4848

49-
AddPropertyInvokers (iface, members, opt, context);
50-
AddMethodInvokers (iface, members, opt, context);
49+
AddPropertyInvokers (iface, iface.Properties.Where (p => !p.Getter.IsStatic && !p.Getter.IsInterfaceDefaultMethod), members, opt, context);
50+
AddMethodInvokers (iface, iface.Methods.Where (m => !m.IsStatic && !m.IsInterfaceDefaultMethod), members, opt, context);
5151

5252
foreach (var i in iface.GetAllDerivedInterfaces ()) {
53-
AddPropertyInvokers (i, members, opt, context);
54-
AddMethodInvokers (i, members, opt, context);
53+
AddPropertyInvokers (iface, i.Properties.Where (p => !p.Getter.IsStatic && !p.Getter.IsInterfaceDefaultMethod), members, opt, context);
54+
AddMethodInvokers (iface, i.Methods.Where (m => !m.IsStatic && !m.IsInterfaceDefaultMethod), members, opt, context);
5555

5656
if (i.FullName == "Java.Lang.ICharSequence")
5757
add_char_enumerator = true;
@@ -63,9 +63,9 @@ void AddMemberInvokers (InterfaceGen iface, HashSet<string> members, CodeGenerat
6363
}
6464
}
6565

66-
void AddPropertyInvokers (InterfaceGen iface, HashSet<string> members, CodeGenerationOptions opt, CodeGeneratorContext context)
66+
void AddPropertyInvokers (InterfaceGen iface, IEnumerable<Property> properties, HashSet<string> members, CodeGenerationOptions opt, CodeGeneratorContext context)
6767
{
68-
foreach (var prop in iface.Properties.Where (p => !p.Getter.IsStatic && !p.Getter.IsInterfaceDefaultMethod)) {
68+
foreach (var prop in properties) {
6969
if (members.Contains (prop.Name))
7070
continue;
7171

@@ -75,9 +75,9 @@ void AddPropertyInvokers (InterfaceGen iface, HashSet<string> members, CodeGener
7575
}
7676
}
7777

78-
void AddMethodInvokers (InterfaceGen iface, HashSet<string> members, CodeGenerationOptions opt, CodeGeneratorContext context)
78+
void AddMethodInvokers (InterfaceGen iface, IEnumerable<Method> methods, HashSet<string> members, CodeGenerationOptions opt, CodeGeneratorContext context)
7979
{
80-
foreach (var m in iface.Methods.Where (m => !m.IsStatic && !m.IsInterfaceDefaultMethod)) {
80+
foreach (var m in methods) {
8181
var sig = m.GetSignature ();
8282

8383
if (members.Contains (sig))

0 commit comments

Comments
 (0)