RicoSuter / Namotion.Reflection

.NET library with advanced reflection APIs.
MIT License
212 stars 44 forks source link

ContextualType throws when type has multiple indexers #154

Open SnowyWreath opened 3 months ago

SnowyWreath commented 3 months ago

In ContextualType's Properties property, the SingleOrDefault call will throw a "Sequence contains more than one matching element" exception when the type contains multiple indexers.

https://github.com/RicoSuter/Namotion.Reflection/blob/a4354e2a8139bf1788fed67758a2970151423fe8/src/Namotion.Reflection/Context/ContextualType.cs#L269