* Added new namespace "Aspects" and types dedicated for aspected handlers processing, including Pre\Post processors

* Added new DescriptorAspectsSet class, used for mamanging and executing aspects of handlers
* Processors can prevent handlers execution using Result.Fault()
* Added field to DescribedHandlerInfo for getting descriptor from which this handler was described
* Removed unused reflection extension methods
This commit is contained in:
2025-08-03 00:28:10 +04:00
parent 18e361322e
commit b14d848537
13 changed files with 203 additions and 11 deletions
+2 -2
View File
@@ -223,11 +223,11 @@ namespace Telegrator.Polling
};
FilterExecutionContext<Update> filterContext = new FilterExecutionContext<Update>(_botInfo, update, update, data, []);
if (!descriptor.Filters.Validate(filterContext))
if (descriptor.Filters != null && !descriptor.Filters.Validate(filterContext))
return null;
UpdateHandlerBase handlerInstance = provider.GetHandlerInstance(descriptor, cancellationToken);
return new DescribedHandlerInfo(updateRouter, client, handlerInstance, filterContext, descriptor.DisplayString);
return new DescribedHandlerInfo(descriptor, updateRouter, client, handlerInstance, filterContext, descriptor.DisplayString);
}
/// <summary>