Demarshal() 공개 정적인 메소드

public static Demarshal ( byte data ) : object>.IDictionary
data byte
리턴 object>.IDictionary
예제 #1
0
        protected bool DefaultMessageHandler(BinaryReader reader, BinaryWriter writer, Func <IDictionary <string, object>, IDictionary <string, object> > callback)
        {
            int len = reader.ReadInt32();

            byte[] bytes = reader.ReadBytes(len);
            IDictionary <string, object> msg   = PipeMessage.Demarshal(bytes);
            IDictionary <string, object> reply = callback(msg);

            if (reply != null)
            {
                WriteMessage(writer, reply);

                if (((IDictionary <String, Object>)reply).ContainsKey("LastMessage"))
                {
                    ((IDictionary <String, Object>)reply).Remove("LastMessage"); // Don't marshal this property
                    return(false);
                }
            }

            return(reply != null);
        }