I have a class defined in C++/CLI as such:
literal Int32 BufferLength = 4000;
Message()
{
num1 = 0;
num2 = 0;
str1 = String::Empty;
buffer = gcnew array<System::SByte>(BufferLength);
};
[ProtoMember(1)]
property double num1
{
double get() { return _num1; }
void set(double value) { _num1 = value; }
}
[ProtoMember(2)]
property double num2
{
double get() { return _num2; }
void set(double value) { _num2 = value; }
}
[ProtoMember(3)]
property String^ str1
{
String^ get() { return _str1; }
void set(String^ value) { _str1 = value; }
}
[ProtoMember(4)]
property array<System::SByte>^ buffer
{
array<System::SByte>^ get() { return _buffer; }
void set(array<System::SByte>^ value) { _buffer = value; }
}
While debugging, I can see the serializer pulling the value from the buffer property with data in tact. When the deserializer runs I see it pushing data into the buffer property, however the array is filled with 0's in lieu of the data that was there before serialize. I've tried setting IsRequired = true on the ProtoMember attribute, no luck.
I have other messages defined with sbyte arrays that are deserializing fine. However, those arrays are quite short (10 maximum). The only thing that stands out here to me is the length of this array. Help! :-)
Edit: I guess I should also mention that I'm using v1 r282.