Add ContentIcon control
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Mediator;
|
||||
|
||||
namespace Toolkit.Framework.Foundation;
|
||||
|
||||
public class ServiceFactoryHandler : IRequestHandler<Create, object?>
|
||||
{
|
||||
private readonly IServiceFactory factory;
|
||||
|
||||
public ServiceFactoryHandler(IServiceFactory factory)
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
public async ValueTask<object?> Handle(Create request, CancellationToken cancellationToken)
|
||||
{
|
||||
return await Task.FromResult(factory.Create(request.Type, request.Parameters));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user