The interface System.Xml.IStreamProvider has two methods:
I understand the purpose of the GetStream method but I don't understand what to do with ReleaseStream. Am I supposed to call Dispose() inside ReleaseStream ?
There are two internal types in the .NET Framework that I know of that implements this interface - ByteStreamStreamProvider
and OperationStreamProvider
in the System.ServiceModel
namespace. Neither of them do anything in the ReleaseStream
method. It's implemented like this in both cases:
public void ReleaseStream(Stream stream)
{
//Noop
}
So depending on your implementation you don't have to do anything.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.