I have a problem with serialization. The class represents a network packet in question and an associated byte array for the payload, Which can be zero.
I understand it by using the GetData and SetData methods in line with the recommendations of the Microsoft Office Framework Design Guidelines, to stop the quaint crossstroke, read and write the array, instead of passing a reference, copy it should do. Guidelines suggest that when there are significant effects such as creating an object / set, and that is what I did.
Unfortunately, the result is that internal members are not ordered. The member has been marked protected except for highlighting it as a public property, how can I serial it when the object is passed from the server to the server from a web service?
(edit: web usage assumes; protocol is unclear in original question)
Can you use WCF? Supports non-public members: DataContractSerializer
supports non-public members:
[DataContract] square fu {[DataMember] // also a field Can be used on - not only private private bars {Get; Set;} // or internal or protected}
If not, then you have to consider it only a DTO and make the property public.
Other options - Binary serialization? BinaryFormatter is not portable between platforms (hence not ideal for all web services), but things are more favorable, but there is no WDSL support for it, nor any IPC stack (this is only raw data).
Comments
Post a Comment