Check all base types for INPC implementation
MODIFY
WalletWasabi.Fluent.Generators/AutoNotifyGenerator.cs
WalletWasabi.Fluent.Generators/AutoNotifyGenerator.cs
@@ -99,7 +99,24 @@ namespace WalletWasabi.Fluent
}
string namespaceName = classSymbol.ContainingNamespace.ToDisplayString();
- bool addNotifyInterface = !classSymbol.Interfaces.Contains(notifySymbol);
+
+ var addNotifyInterface = !classSymbol.Interfaces.Contains(notifySymbol);
+ var baseType = classSymbol.BaseType;
+ while (true)
+ {
+ if (baseType is null)
+ {
+ break;
+ }
+
+ if (baseType.Interfaces.Contains(notifySymbol))
+ {
+ addNotifyInterface = false;
+ break;
+ }
+
+ baseType = baseType.BaseType;
+ }
var source = new StringBuilder();

MODIFY
WalletWasabi.Fluent.Generators/PropertyGenerator.cs
WalletWasabi.Fluent.Generators/PropertyGenerator.cs
@@ -112,7 +112,24 @@ namespace WalletWasabi.Fluent
}
string namespaceName = classSymbol.ContainingNamespace.ToDisplayString();
- bool addNotifyInterface = !classSymbol.Interfaces.Contains(notifySymbol);
+
+ var addNotifyInterface = !classSymbol.Interfaces.Contains(notifySymbol);
+ var baseType = classSymbol.BaseType;
+ while (true)
+ {
+ if (baseType is null)
+ {
+ break;
+ }
+
+ if (baseType.Interfaces.Contains(notifySymbol))
+ {
+ addNotifyInterface = false;
+ break;
+ }
+
+ baseType = baseType.BaseType;
+ }
var source = new StringBuilder();

Check all base types for INPC implementation