* 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user