Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ protected internal TypeFactory()
}

type = CreateCSharpTypeCore(inputType);
TypeCache.Add(inputType, type);
// Use indexer instead of Add() to handle re-entrant calls.
// Self-referencing models (e.g. QueryFilter with "and: QueryFilter[]")
// cause CreateCSharpTypeCore to recursively call CreateCSharpType for the
// same InputType before the outer call completes. The inner call adds the
// key first; the outer call then overwrites with the same value harmlessly.
TypeCache[inputType] = type;
return type;
}

Expand Down
Loading