Open ryanwilliams83 opened 2 years ago
I'm trying to use JsonSchema.FromType() but it's throwing an InvalidOperationException.
I suspect the reason is that ArrayList.GetEnumerator has an overload which is not working with https://github.com/RicoSuter/Namotion.Reflection/blob/master/src/Namotion.Reflection/Context/ContextualType.cs#L146
I don't fully understand your code but I'd like to suggest the following possible solution var getEnumeratorMethod = Methods.SingleOrDefault(m => m.Name == "GetEnumerator" && m.Parameters.Length == 0);
I'm trying to use JsonSchema.FromType()
but it's throwing an InvalidOperationException.
I suspect the reason is that ArrayList.GetEnumerator has an overload which is not working with https://github.com/RicoSuter/Namotion.Reflection/blob/master/src/Namotion.Reflection/Context/ContextualType.cs#L146
I don't fully understand your code but I'd like to suggest the following possible solution var getEnumeratorMethod = Methods.SingleOrDefault(m => m.Name == "GetEnumerator" && m.Parameters.Length == 0);