I am designing an WPF app shell using MEF. I would like to have the app start a "view" upon startup. I also would like the option of having another add-in have a "startup" attribute and then the app would load that one instead. I've made an interface:
[InheritedExport]
public interface IStartupParams
{
/// <summary>Gets or sets the WindowMode property.</summary>
WindowMode WindowMode { get; set; }
/// <summary>Gets or sets the NavigateUri property.</summary>
string NavigateUri { get; set; }
/// <summary>Gets or sets the Priority property.</summary>
int Priority { get; set; }
}
So the app would load multiple IStartupParams concrete classes and select the one with the highest priority.
What do you guys thing about this design? Any ideas?