hello radzen team,
i have a question about a feature...
I have some code for exception handling (creating nice text for the user for DB Exceptions).
I inject the ExceptionService in the custom partial component.
[Inject]
public ExceptionService ExceptionService { get; set; }
because i cannot choose the ExceptionService.FormatException() method from the Service directly
so i want to ask you if its possible to add a feature to the designer to choose also methods from DI objects not only methods in the partial component class?
something like chodsing a parameter property...
using Microsoft.AspNetCore.Components;
using Radzen;
using System;
using Trent.Services;
namespace Trent.Pages
{
public partial class AddArtikelgruppeComponent
{
[Inject]
public ParameterService ParameterService { get; set; }
[Inject]
public BrowserService BrowserService { get; set; }
[Inject]
public ExceptionService ExceptionService { get; set; }
protected void Initialize()
{
}
protected void Exception(Exception e)
{
ExceptionService.FormatException(e,NotificationService);
}
protected async void OnClose(int? addedEntityId)
{
if (ParameterService.OpenedAsDialog)
{
DialogService.Close(addedEntityId);
}
else
{
UriHelper.NavigateTo("artikelgruppe");
}
}
}
}
I mean it were easier to define the ExceptionService.FormatException() method directly in the designer.
For now this isnt possible because the methods of injected objects are not shown in the "invoke method " list.