c# - Reference type is changed in proxy class that generated from WCF -
I know that the title is a bit confusing, so here's the explanation:
I try streaming Having a big file with WCF and I like to know how to do it.
When I wrote a method:
[Operation Contact] zero sendStream (System.IO.Stream _StreamSource); There, in the Proxy class generated system in my client app. IOstream type input will be correct as paper.
But if I create another category: <[message] [message] [message] [known type (typef (stream))] Public class MyData {[MessageHeader (MustUnderstand = true)] Public string key {Get; Set; } [MessageBodyMember (Order = 1)] {Receive Public Stream Data; Set; }}
and the service interface is:
[OperationCractracta] zero-dispatch (MyData_Stream Source); In the My Client class, the stream type service reference namespace from Myadata will be under the namespace.
i.e.: MyServiceRef.stream
Pass the stream into WCF who has not made me.
But this is not for string and int accessories.
I wonder, why do I know the type of stream type string and int?
Or is there any remedy?
Thanks in advance!
known type attribute to add WCF to type definitions in the service context Provides instructions. It appears that to use a service-generated type, there is also a side-effect on creating any properties of a known type within the datacontext. (This makes sense for the general use of the known type, where WCF otherwise does not know about the type.) Did you make stream without declaring Have tried to use the contract known type ?
Comments
Post a Comment