Refactor query behaviors for execution tracking
Refactored `BodyQueryBehavior` and `HeaderQueryBehavior` to introduce explicit execution tracking with new properties (`BodyQueryExecuted` and `HeaderQueryExecuted`). Updated `RecActionDto` to include computed properties (`IsBodyQueryReturnedNoData` and `IsHeaderQueryReturnedNoData`) for clearer null-checking logic. Removed the `IsReturnedNoData` tuple for simplicity. Updated `InvokeRecActionCommandHandler` to use the new `IsBodyQueryReturnedNoData` property. Improved logging for better diagnostics and clarified handling of null results in query behaviors.
This commit is contained in:
@@ -54,13 +54,19 @@ public record RecActionDto
|
||||
|
||||
public string? HeaderQuery { get; init; }
|
||||
|
||||
public bool HeaderQueryExecuted { get; set; } = false;
|
||||
|
||||
public bool IsHeaderQueryReturnedNoData => HeaderQueryExecuted && HeaderQuery is null;
|
||||
|
||||
public Dictionary<string, string>? Headers { get; set; }
|
||||
|
||||
public string? BodyQuery { get; init; }
|
||||
|
||||
public string? Body { get; set; }
|
||||
|
||||
public (bool BodyQuery, bool HeaderQuery) IsReturnedNoData = (false, false);
|
||||
public bool BodyQueryExecuted { get; set; } = false;
|
||||
|
||||
public bool IsBodyQueryReturnedNoData => BodyQueryExecuted && Body is null;
|
||||
|
||||
public string? PostprocessingQuery { get; init; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user