Skip to content

Handle AsParameters-enabled types with indexers in request delegate creation #48118

@captainsafia

Description

@captainsafia

Follow-up to #47914 (comment).

The implementation for the AsParameters feature in both RDF and RDG doesn't currently handle types that contain indexers:

public class ClassWithIndexer
{
    private int[] arr = new int[100];

    public int this[int i]
    {
        get { return arr[i]; }
        set { arr[i] = value; }
    }
}

We'll want to explore either:

  • Adding support for this feature
  • Explicitly disabling support for types that contain indexers with RDF

If we do consider adding support, we may want to tie this with the existing array binding features in RDF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-rdffeature-rdg

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions