You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert GlobalSystemMediaTransportControlsSession.MediaPropertiesChanged to IObservable. However, it delegates a TypedEventHandler, not EventArgs, so a conversion is needed and ...
letconversion(handler:EventHandler<_>):Windows.Foundation.TypedEventHandler<_,_>=
Windows.Foundation.TypedEventHandler(fun s e -> handler.Invoke(s, e))
Observable.fromEventConversionOn
Scheduler.Scheduler.EventLoop
conversion
session.add_MediaPropertiesChanged
session.remove_MediaPropertiesChanged
// Following doesn't compile
Observable.fromEventConversion
conversion
session.add_MediaPropertiesChanged
session.remove_MediaPropertiesChanged
In decompiler:
I also wonder if there is better solution (for TypedEventHandler), Observable.fromEventGeneric doesn't work.
Type constraint mismatch. The type ''a -> unit' is not compatible with type 'Windows.Foundation.TypedEventHandler<GlobalSystemMediaTransportControlsSession,MediaPropertiesChangedEventArgs>'
The text was updated successfully, but these errors were encountered:
I'm trying to convert
GlobalSystemMediaTransportControlsSession.MediaPropertiesChanged
to IObservable. However, it delegates aTypedEventHandler
, notEventArgs
, so aconversion
is needed and ...In decompiler:
I also wonder if there is better solution (for
TypedEventHandler
),Observable.fromEventGeneric
doesn't work.The text was updated successfully, but these errors were encountered: