dotnet / dotnet/wcf

Provide IAsyncCommunicationObject wrapper where needed

Open
#1,088 0 comments 0 reactions 1 assignee Claimed by @mconnew View on GitHub
Backlog enhancement
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

We have moved to using IAsyncCommunicationObject within the product code to enable the Task-based code paths. However, this interface is not in the public contract. There are now a few places in the code where we test whether a type is IAsyncCommunicationObject and take the Task code path when it is. When it isn't, we take alternate code paths that could be unreachable.

The assignment for this issue is to investigate whether it is possible to every take the "else" code path and have a communication object that is not IAsyncCommunicationObject (or IAsyncChannelFactory where that applies). If the code is unreachable, replace it either with an assert, or make the type casts hard casts instead of "as" casts.

If the "else" path is reachable, consider adding an IAsyncCommunicationObject wrapper that knows how to delegate IAsyncCommunicationObject Task API calls to the older Begin/End pattern.

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.