A widget should have only one IWidgetViewModel by default... wondering whether if we should go for the first served, or throw if multiple detected, or ignore the widget
This commit is contained in:
@@ -6,14 +6,18 @@ public interface IWidgetBuilder
|
||||
{
|
||||
IWidgetHost Build();
|
||||
|
||||
IWidgetBuilder Configuration<TConfiguration>(Action<TConfiguration> configurationDelegate)
|
||||
where TConfiguration :
|
||||
WidgetConfiguration,
|
||||
new();
|
||||
|
||||
IWidgetBuilder ConfigureServices(Action<IServiceCollection> configureDelegate);
|
||||
}
|
||||
|
||||
public interface IWidgetBuilder<TConfiguration> :
|
||||
IWidgetBuilder
|
||||
where TConfiguration :
|
||||
WidgetConfiguration,
|
||||
new()
|
||||
{
|
||||
IWidgetBuilder UseViewModel<TViewModel>()
|
||||
where TViewModel :
|
||||
IWidgetViewModel;
|
||||
|
||||
IWidgetBuilder UseViewModelTemplate<TViewModel, TTemplate>()
|
||||
where TViewModel :
|
||||
IWidgetViewModel;
|
||||
}
|
||||
Reference in New Issue
Block a user