c# byte[] to AMF3 ByteArray

SergiySergiy
edited November 2012 in Flash (deprecated)
Hi

I have a serialized object on server like this:
[code2=csharp]public OperationResponse GetOperationResponse(ErrorCodes errorCode, string debugMessage)
{
Dictionary<byte, object> encryptedDictionary = new Dictionary<byte, object>
{
{(byte) OperationParameters.MessageText, "Hello World"}
};

BinaryFormatter binaryFormatter=new BinaryFormatter();
MemoryStream memoryStream=new MemoryStream();
binaryFormatter.Serialize(memoryStream,encryptedDictionary);
byte[] encryptedArray = memoryStream.ToArray();

return new OperationResponse
{
OperationCode = OperationRequest.OperationCode,
ReturnCode = (short)errorCode,
DebugMessage = debugMessage,
Parameters =
new Dictionary<byte, object>
{
{(byte) OperationParameters.EncryptedObject, encryptedArray}
}
};
}[/code2]
Now I need to pass this object to AMF3 client. How can I do this? Out-of-the-box flash client cannot deserialaize it....

Thanks
Sign In or Register to comment.