Skip to content

bool useExplicitArray = false #1

@enkelmedia

Description

@enkelmedia

Add bool useExplicitArray = false

case TypeCode.Object:
                    if (type.IsArray)
                    {
                        // Used for "extend" since we cant extend array with []
                        if (useExplicitArray)
                            return "Array<" + TypeName(type.GetElementType()) + ">";

                        return TypeName(type.GetElementType()) + "[]";
                    }

and around L.116

// any other enumerable
                        if (genericType.GetInterfaces().Any(e => e.GetGenericTypeDefinition() == typeof(IEnumerable<>)))
                        {
                            if(useExplicitArray)
                                return "Array<" + TypeName(generics[0]) + ">";
                            return TypeName(generics[0]) + "[]";
                        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions