Solution Wide Analysis and Source Generators Follow
I use Source Generators to implement Aspect Oriented Programming via Proxy Pattern.
The Souce Generator I use works fine, and program compiles... but Solution Wide Analysis seems not to know there are automatic generated sources (as partial classes) and complains with a lot of errors.
Example:
I use nuget package Rop.ProxyGenerator
Example:
[ProxyOf("IHasOut","_controlIHasOut")]
public partial class WithHasOut : BaseControl, IHasOut
{
private HasOutAop _controlHasOutAop=new HasOutAop();
}
Rop.ProxyGenerator generates automatically the AOP methods and properties using Proxy Pattern:
// Autogenerated code for Proxy class
namespace Test.Winforms
{
public partial class ConUnOut
{
public virtual bool TryGetValue(int key, int value)
{
return _controlIHasOut.TryGetValue(key, value);
}
}
}
But Solution Wide Analysis doens't read this code, and complains that TryGetValue is not defined.
But I don't want to turn off Solution Wide Analysis...
Any solution?
Please sign in to leave a comment.
Hello ramon, thank you for your question. Could you please check if you have a "pause" icon above the vertical scrollbar in the file with autogenerated code?