Skip to content

Commit

Permalink
Merge pull request #164 from honda-tatsuya/fix-codegenerator
Browse files Browse the repository at this point in the history
fix: DynamicArgumentTuple is not registered when return type is embedded array type.
  • Loading branch information
neuecc committed Jul 1, 2019
2 parents d4507f9 + 58f7ab1 commit 4cfbbae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/MagicOnion.UniversalCodeGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ static void ExtractResolverInfo(InterfaceDefinition[] definitions, out GenericSe
if (method.UnwrappedOriginalResposneTypeSymbol.TypeKind == Microsoft.CodeAnalysis.TypeKind.Array)
{
var array = method.UnwrappedOriginalResposneTypeSymbol as IArrayTypeSymbol;
if (embeddedTypes.Contains(array.ToString())) continue;
MakeArray(array, genericInfos);
if (array.ElementType.TypeKind == TypeKind.Enum)
if (!embeddedTypes.Contains(array.ToString()))
{
MakeEnum(array.ElementType as INamedTypeSymbol, enumInfos);
MakeArray(array, genericInfos);
if (array.ElementType.TypeKind == TypeKind.Enum)
{
MakeEnum(array.ElementType as INamedTypeSymbol, enumInfos);
}
}
}
else if (method.UnwrappedOriginalResposneTypeSymbol.TypeKind == Microsoft.CodeAnalysis.TypeKind.Enum)
Expand Down

0 comments on commit 4cfbbae

Please sign in to comment.