Skip to content

Commit

Permalink
fix dotnet 8 breakage in SlowDictionaryAccessor by getting the enumer…
Browse files Browse the repository at this point in the history
…ator through IDictionary instead of IEnumerable
  • Loading branch information
TylerReid authored and xoofx committed Nov 22, 2023
1 parent d920cc4 commit be77b39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tomlyn/Model/Accessors/DictionaryDynamicAccessor.cs
Expand Up @@ -227,8 +227,7 @@ public SlowDictionaryAccessor(DynamicModelReadContext context, Type dictionaryTy

public override IEnumerable<KeyValuePair<string, object?>> GetElements(object dictionary)
{
var it = (IEnumerable)dictionary;
var enumerator = (IDictionaryEnumerator)it.GetEnumerator();
var enumerator = ((IDictionary)dictionary).GetEnumerator();
while (enumerator.MoveNext())
{

Expand Down

0 comments on commit be77b39

Please sign in to comment.