dotnet / dotnet/dotnet-api-docs
Add DispatchProxy.Create sample
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
As part of https://github.com/dotnet/runtime/issues/16614
> I just tried this API for the first time and I feel similarly: I was totally dumbfounded about how my proxy could possibly forward the call onto the appropriate receiver object since it wasn't clear how to pass data to the proxy itself. I had to look at corefx tests for this class before I realized I could downcast the proxy interface to my base class, and add a property to my base class, in order to set its dependencies.
> IMHO this is a docs issue. The scenario works (cast the returned proxy to your base type and set properties), but it's not intuitive. We need to amend the existing docs with sample code showing how to accomplish these common scenarios.
Contributor guide
Assessment
This issue has not been assessed yet.