dotnet / dotnet/aspnetcore

Handle `AsParameters`-enabled types with indexers in request delegate creation

Open
#48,118 4 comments 0 reactions 0 assignees View on GitHub
area-minimal feature-rdf feature-rdg
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Follow-up to https://github.com/dotnet/aspnetcore/pull/47914#discussion_r1185483963.

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

```csharp
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.