Skip to content

Commit 193d684

Browse files
committed
优化GetAttributes逻辑
1 parent 5a777dc commit 193d684

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WebApiClient/Contexts/ApiParameterDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ protected virtual IEnumerable<IApiParameterAttribute> GetAttributes(Type paramet
144144
return RepeatOne<CancellationTokenAttribute>();
145145
}
146146

147-
if (defined.Any() == false)
147+
if (defined.Any() == true)
148148
{
149-
return RepeatOne<PathQueryAttribute>();
149+
return defined;
150150
}
151151

152-
return defined;
152+
return RepeatOne<PathQueryAttribute>();
153153
}
154154

155155
/// <summary>

0 commit comments

Comments
 (0)