break widget related stuff into its own project as the main HB project was just becoming too bloated
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace Hyperbar.Widget;
|
||||
|
||||
public class WidgetFactory :
|
||||
IFactory<Type, IWidget>
|
||||
{
|
||||
public IWidget? Create(Type value)
|
||||
{
|
||||
if (Activator.CreateInstance(value) is IWidget widget)
|
||||
{
|
||||
return widget;
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user