Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 941093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:03:49+00:00 2026-05-15T22:03:49+00:00

I am trying to use Reactive Extensions to write code to handle an asynchronous

  • 0

I am trying to use Reactive Extensions to write code to handle an asynchronous call where both the initiating method and the completed event are static. I can’t use

var languageSetsLoaded = Observable
  .FromEvent<LoadLanguageSetsCompletedEventArgs>(
    LanguageManager, "LanguageSetsLoaded")

as LanguageManager is a static class rather than an instance, so I tried

var languageSetsLoaded = Observable
  .FromEvent<LoadLanguageSetsCompletedEventArgs>(
    h => LanguageManager.LanguageSetsLoaded += h,
    h => LanguageManager.LanguageSetsLoaded -= h )

but that gives a syntax error “Cannot convert lambda expression to type ‘object’ because it is not a delegate type”. The event is declared thus

public delegate void LoadLanguageSetsCompletedHandler(LoadLanguageSetsCompletedEventArgs e);
public static event LoadLanguageSetsCompletedHandler LanguageSetsLoaded = delegate { };

so I think it is a delegate type and perhaps the fact that it is static is producing a misleading error description.

Is their some way to do this or am I just going to have to stick to non-reactive code like this?

private void ChangeLanguage(string languageCode)
{
  LanguageManager.LanguageSetsLoaded += OnLanguageSetsLoaded;
  LanguageManager.LoadLanguageSets(languageCode, BaseApp.InTranslationMode);
}

private void OnLanguageSetsLoaded(LoadLanguageSetsCompletedEventArgs e)
{
  LanguageManager.LanguageSetsLoaded -= OnLanguageSetsLoaded;
  OnPropertyChanged("DummyLanguageResource");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:03:50+00:00Added an answer on May 15, 2026 at 10:03 pm

    I think the problem is your delegate type of your event. Try changing it to:

    public static event EventHandler<LoadLanguageSetsCompletedEventArgs> 
        LanguageSetsLoaded = delegate { };
    

    If you look at the signature of Observable.FromEvent that you’re trying to use, it looks like this:

    public static IObservable<IEvent<TEventArgs>> FromEvent<TEventArgs>(
        Action<EventHandler<TEventArgs>> addHandler,
        Action<EventHandler<TEventArgs>> removeHandler
    )
    where TEventArgs : EventArgs
    

    Alternatively you could use the overload which has three arguments, the first one being a conversion handler – but I think you’d be better off just changing the event signature if at all possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 498k
  • Answers 498k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Provided this code is explicitly in the MVC project (rather… May 16, 2026 at 12:25 pm
  • Editorial Team
    Editorial Team added an answer Validation happens in the Authlogic::Session::Password module. If you wanted to… May 16, 2026 at 12:25 pm
  • Editorial Team
    Editorial Team added an answer Are you sure the URL you are loading are correct?… May 16, 2026 at 12:25 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am trying to use the .NET Reactive Framework to simplify some asynchronous calls
I want to put Reactive Extensions for .NET (Rx) to good use and would
I'm trying to use the follow code to produce a decimal number, but the
I am trying to use the following code to take screen shots from my
I'm trying use the modulo operator (%) on long longs, and it seems to
I was trying use a set of filter functions to run the appropriate routine,
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
I am trying use the jQuery table sorter plugin for a table that is
I am trying use jQuery to poll dynamic DOM nodes, created outside of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.