Skip to content

Commit

Permalink
Fix cache in RestService for generated type (#1348)
Browse files Browse the repository at this point in the history
Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
  • Loading branch information
Int32Overflow and glennawatson committed Apr 12, 2023
1 parent 469bfce commit 3c87611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Refit/RestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static T For<T>(string hostUrl, RefitSettings? settings)
/// <returns>An instance that implements <paramref name="refitInterfaceType"/>.</returns>
public static object For(Type refitInterfaceType, HttpClient client, IRequestBuilder builder)
{
var generatedType = TypeMapping.GetOrAdd(refitInterfaceType, GetGeneratedType(refitInterfaceType));
var generatedType = TypeMapping.GetOrAdd(refitInterfaceType, GetGeneratedType);

return Activator.CreateInstance(generatedType, client, builder)!;
}
Expand Down

0 comments on commit 3c87611

Please sign in to comment.