In Brighter we discovered that only allowing the context to be created in the when the processor is called, prevents us passing additional information that the processing pipeline needs, into the pipeline from outside. It was only possible to do that via handler or decorator. This particularly obstructed work on OTel.
In V10 we made it possible to pass the RequestContext in to the CommandProcessor in Brighter as an optional (nullable) parameter. If null, we create the RequestContext via the RequestContextFactory, if not null, we use the context that is passed in.
Similarly in Darker we need to make it possible to pass the QueryContext in to the IQueryProcessor in Darker as an optional (nullable) parameter to Execute and ExecuteAsync (for ExecuteAsync it should be the second parameter) . In QueryProcessor's implementation: if null, we create the context via the IQueryContextFactory, if not null, we use the QueryContext that is passed in.
This is a breaking change to the interface of IQueryProcessor, and so is a V5 feature
In Brighter we discovered that only allowing the context to be created in the when the processor is called, prevents us passing additional information that the processing pipeline needs, into the pipeline from outside. It was only possible to do that via handler or decorator. This particularly obstructed work on OTel.
In V10 we made it possible to pass the
RequestContextin to theCommandProcessorin Brighter as an optional (nullable) parameter. If null, we create the RequestContext via the RequestContextFactory, if not null, we use the context that is passed in.Similarly in Darker we need to make it possible to pass the
QueryContextin to theIQueryProcessorin Darker as an optional (nullable) parameter to Execute and ExecuteAsync (for ExecuteAsync it should be the second parameter) . InQueryProcessor's implementation: if null, we create the context via the IQueryContextFactory, if not null, we use theQueryContextthat is passed in.This is a breaking change to the interface of IQueryProcessor, and so is a V5 feature