We have a contract passing a large object using streaming. The service and message contracts boil down to something like this.
[ServiceContract]
public interface IData
{
[OperationContract]
Item Get(ItemRequest request);
[OperationContract]
void Put(Item request);
}
[MessageContract]
public class Item: IDisposable
{
[MessageBodyMember(Order = 1)]
public Stream FileByteStream;
public void Dispose() {...}
}
The Item class provides a standard implementation of the Disposable pattern. My question is does WCF call the Dispose method of the Item class. WCF via the ServiceHost is basically taking responsibility for passing and receiving the Item object from our service contract implementation.
There are many examples on the web (such as this), but none of them ever call dispose or mention if it occurs.