Beispiel #1
0
        protected byte[] CreateRequest(V3Message v3Msg, IDictionary headers)
        {
            Header[] headersArray = null;

            if (headers != null)
            {
                headersArray = new Header[headers.Count];
                int i = 0;

                foreach (String headerName in headers.Keys)
                {
                    headersArray[i] = new Header(headerName, false, -1, new ConcreteObject(headers[headerName]));
                }
            }
            else
            {
                headersArray = new Header[0];
            }

            Body[] bodiesArray = new Body[1];
            bodiesArray[0] = new Body("null", "null", -1, null);

            Request request = new Request(3, headersArray, bodiesArray);

            request.setResponseBodyData(new object[] { v3Msg });

            return(AMFSerializer.SerializeToBytes(request));
        }