Example #1
0
        private static void PrintRequestHeader(System.IO.StringWriter s, Ice.InputStream str)
        {
            PrintIdentityFacetOperation(s, str);

            try
            {
                byte mode = str.ReadByte();
                s.Write("\noperation mode = " + (int)mode + ' ');
                switch (mode)
                {
                case 0:
                {
                    s.Write("(non-idempotent)");
                    break;
                }

                case 1:
                {
                    s.Write("(idempotent/nonmutating)");
                    break;
                }

                case 2:
                {
                    s.Write("(idempotent)");
                    break;
                }

                default:
                {
                    s.Write("(unknown)");
                    break;
                }
                }

                int sz = str.ReadSize();
                s.Write("\ncontext = ");
                while (sz-- > 0)
                {
                    string key = str.ReadString();
                    string val = str.ReadString();
                    s.Write(key + '/' + val);
                    if (sz > 0)
                    {
                        s.Write(", ");
                    }
                }

                Ice.Encoding v = str.SkipEncapsulation();
                s.Write("\nencoding = ");
                s.Write(v.ToString());
            }
            catch (System.IO.IOException)
            {
                Debug.Assert(false);
            }
        }
Example #2
0
        private static void PrintReply(System.IO.StringWriter s, Ice.InputStream str)
        {
            int requestId = str.ReadInt();

            s.Write("\nrequest id = " + requestId);

            var replyStatus = (ReplyStatus)str.ReadByte();

            s.Write($"\nreply status = {replyStatus}");

            if (replyStatus == ReplyStatus.OK || replyStatus == ReplyStatus.UserException)
            {
                _ = str.SkipEncapsulation();
                s.Write("\nencoding = ");
            }
        }