-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong observable event signature generated for events hidden in the inheriting class #209
Comments
Thanks, Third party libraries are a bit hard for us to test against even with trials. Is PaintEx a generic type? |
Let me help you then. This is what gets generated: public global::System.IObservable<global::DevExpress.Utils.XtraPaintEventArgs> PaintEx=>global::System.Reactive.Linq.Observable.Create<global::DevExpress.Utils.XtraPaintEventArgs>(obs=>
{
void Handler( object sender, global::DevExpress.Utils.XtraPaintEventArgs e) =>obs.OnNext(e);
_data.PaintEx+=Handler;
return global::System.Reactive.Disposables.Disposable.Create(() => _data.PaintEx-=Handler);
}); I digged into decompile and figured out that the base public event XtraPaintEventHandler PaintEx
{
add => this.Events.AddHandler(XtraControl.paintEx, (Delegate) value);
remove => this.Events.RemoveHandler(XtraControl.paintEx, (Delegate) value);
} The public event TextEditPaintExEventHandler PaintEx
{
add => this.Events.AddHandler(TextEdit.paintEx, (Delegate) value);
remove => this.Events.RemoveHandler(TextEdit.paintEx, (Delegate) value);
} So it seems to me that the source generator just incorrectly uses the hidden event instead of the new one. |
Any news? Or perhaps there is some existing workaround for the time being to somehow disable some part of the codegen just to make it compile, apart from manually doing ye olde FromEventPattern? |
Any update? Having the same issue. |
Description
When using the source generator on newest DevExpress WinForms controls (using .NET Framework 4.8) the result can't be compiled because of some wrongly generated code. It seems that
PaintEx
signature differs from what the source generator assumes, so the result can't be compiled.How to repro
Result
The following error pops up on compilation:
The text was updated successfully, but these errors were encountered: