Skip to content

Commit

Permalink
...also for OpenApiClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorium authored and sergey-tihon committed May 30, 2020
1 parent 41576a2 commit bbc6aa6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ type public OpenApiClientTypeProvider(cfg : TypeProviderConfig) as this =
|> sprintf "%A"


match Cache.providedTypes.TryRetrieve(cacheKey) with
| Some(ty) -> ty
| None ->
let addCache() =
let schemaData =
match schemaPathRaw.StartsWith("http", true, null) with
| true ->
Expand Down Expand Up @@ -88,8 +86,8 @@ type public OpenApiClientTypeProvider(cfg : TypeProviderConfig) as this =
ty.AddMembers tys
tempAsm.AddTypes [ty]

Cache.providedTypes.Set(cacheKey, ty)
ty
Cache.providedTypes.GetOrAdd(cacheKey, addCache)
)
t
do
Expand Down

0 comments on commit bbc6aa6

Please sign in to comment.