dotnet / wcf

This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.
MIT License
1.69k stars 556 forks source link

Missing ClientBase<TChannel>.Close() #2282

Closed EPinci closed 5 years ago

EPinci commented 6 years ago

Hello,

Looks like the method ClientBase.Close() is no longer there. How do I close a client?

Thank you.

zhenlan commented 6 years ago

Hi @EPinci, you can call Dispose() on it https://github.com/dotnet/wcf/blob/0066c64bd8536b732309ee1a9fc4037c02266e4c/src/System.ServiceModel.Primitives/ref/System.ServiceModel.Primitives.cs#L142

EPinci commented 6 years ago

Understood, thank you.

Can I ask you to comment on this article: this is widely reported around and does it still apply?

Thank you.

ericstj commented 5 years ago

You might consider bringing this back in the references. We brought back all Close() members in CoreFx and I see you kept the Close method in the implementation. The Close/Dispose confusion didn't outweigh the sheer number of hits on the missing Close methods.

You might also consider looking at a diff for other types that were subsetted "on principle". We've backed off most of those principles since 2.0. /cc @terrajobst @danmosemsft

StephenBonikowsky commented 5 years ago

@ericstj I opened #3101 to do this work.

ericstj commented 5 years ago

Sorry I missed that this one was actually fixed. Thanks for opening the new issue.