I have a windows mobile application that sends data via WCF to a server.
The data it sends sometimes exceeds the limit on the windows mobile device. I am wondering if streaming would help not need to hold all the data I must send in memory at once.
Here is a simple example:
[DataContract]
public class MainContract
{
[DataMember]
public Guid ID { get; set; }
[DataMember]
public List<SubContract> SubContract { get; set; }
}
[DataContract]
public class SubContract
{
[DataMember]
public Guid ID { get; set; }
[DataMember]
public string ImageCaption { get; set; }
[DataMember]
public Byte[] ImageAsBytes { get; set; }
}
Say I have only 1 MainContract
object. But it has a lot of SubContract
objects in it. (My real scenario is more compelex).
Holding all of MainContract
in memory is too much for the client side to do.
Will streaming allow me to send send the data over the wire in pieces? Or do I still have to buffer it all on the client side and the streaming just helps with the receiving of large data?