using Connected.Middleware; namespace Connected.Services; /// /// Default implementation of the interface. /// /// The type of the arguments to provide values for. public abstract class ArgumentValueProvider : MiddlewareComponent, IArgumentValueProvider where TArgs : IDto { /// /// The arguments object to which values are to be provided. /// protected TArgs Arguments { get; private set; } = default!; /// /// This method gets invoked by the platform. /// /// The arguments object to which the values can be provided. public async Task Invoke(TArgs args) { Arguments = args; await OnInvoking(); } /// /// Override this method to perform business logic. /// protected virtual async Task OnInvoking() { await Task.CompletedTask; } }