1

I'm trying to implement the interface IPartImportsSatisfiedNotification but unfortunately it does not work. This bug I have only the prism. I can't understand why this is happening.

Test Application

public partial class App : Application, IPartImportsSatisfiedNotification
{
    [Import]
    public IPlugin plugin { get; set; }

    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);
        var bootstrapper = new Bootstrapper();
        bootstrapper.Run();
    }

    public void OnImportsSatisfied() // This code is not called
    {
        var x = plugin;
    }
}
4

0 回答 0