Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Http/Wolverine.Http/CodeGen/QueryStringBindingFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public bool TryMatch(HttpChain chain, IServiceContainer container, ParameterInfo
if (parameter.ParameterType.IsTypeOrNullableOf<TimeSpan>()) return false;
if (parameter.ParameterType.IsTypeOrNullableOf<Guid>()) return false;

chain.ComplexQueryStringType = parameter.ParameterType;

variable = new QueryStringBindingFrame(parameter.ParameterType, chain).Variable;
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Wolverine.Http/HttpChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public override bool HasAttribute<T>()

public override Type? InputType()
{
return HasRequestType ? RequestType : null;
return HasRequestType ? RequestType : ComplexQueryStringType;
}

public override Frame[] AddStopConditionIfNull(Variable variable)
Expand Down Expand Up @@ -642,6 +642,7 @@ public HttpElementVariable GetOrCreateHeaderVariable(IFromHeaderMetadata metadat
public bool HasRequestType => RequestType != null && RequestType != typeof(void);

public bool IsFormData { get; internal set; }
public Type? ComplexQueryStringType { get; set; }

internal Variable BuildJsonDeserializationVariable()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Persistence/Wolverine.Marten/AggregateHandlerAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ public override void Modify(IChain chain, GenerationRules rules, IServiceContain

CommandType = chain.InputType();
if (CommandType == null)
{
throw new InvalidOperationException(
$"Cannot apply Marten aggregate handler workflow to chain {chain} because it has no input type");
}

AggregateType ??= DetermineAggregateType(chain);

Expand Down
Loading