Skip to content

Commit

Permalink
feat: avoid IDictionary recognize as enumerable graph type
Browse files Browse the repository at this point in the history
  • Loading branch information
vcup committed May 21, 2024
1 parent ffd0b99 commit d502167
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public static bool IsPrimitiveGraphType(this TypeInfo type)

public static bool IsEnumerableGraphType(this TypeInfo type)
{
if (type.ImplementInterface(typeof(IDictionary)) || type.ImplementInterface(typeof(IDictionary<,>)))
{
return false;
}
return type.ImplementInterface(typeof(ICollection<>)) ||
type.ImplementInterface(typeof(IReadOnlyCollection<>), true) ||
type.IsGenericType(typeof(IEnumerable<>)) ||
Expand Down

0 comments on commit d502167

Please sign in to comment.