SelectedLanguageChangedEvent

This class provides a push notification to all of the clients subscribers, when programming language has been changed in JustDecompile.

Event base notification is dispatched to all of the subscribers.

Syntax

C#
    public class SelectedLanguageChangedEvent : CompositePresentationEvent
    {
    }

    public interface ILanguage
    {
        Languages SelectedLanguage { get; }
    }

    public enum Languages
    {
        VisualBasic,
        CSharp,
        MSIL
    }

Example

You can subscribe to this event using the following code:

C#
    public void OnImportsSatisfied()
    {
        this.eventAggregator.GetEvent().Subscribe(OnLanguageChanged);
    }

    private void OnLanguageChanged(ILanguage language)
    {
        switch (language.SelectedLanguage)
        {
            case Languages.VisualBasic:
            break;

            case Languages.CSharp:
            break;

            case Languages.MSIL:
            break;

            default:
            break;
        }

An ILanguage instance is provided by JustDecompile to all of the event subscribers. It contains the currently selected programming language in the application.

In this article