Ejemplo n.º 1
0
        public override QResponse Dispatch(QueryServerContext Context,
                    TicketData TicketData)
        {
            AdvertiseResponse Response = new AdvertiseResponse();

            return Response;
        }
Ejemplo n.º 2
0
        public static void Deserialize(string _Input, out AdvertiseResponse Out)
        {
            StringReader _Reader = new StringReader (_Input);
            JSONReader JSONReader = new JSONReader (_Reader);

            JSONReader.StartObject ();
            string token = JSONReader.ReadToken ();
            Out = null;

            switch (token) {

                case "AdvertiseResponse" : {
                    AdvertiseResponse Result = new AdvertiseResponse ();
                    Result.Deserialize (JSONReader);
                    Out = Result;
                    break;
                    }

                default : {
                    throw new Exception ("Not supported");
                    }
                }
            JSONReader.EndObject ();

            // should we check for EOF here?
        }
Ejemplo n.º 3
0
        public static void Deserialize(string _Input, out QResponse Out)
        {
            StringReader _Reader = new StringReader (_Input);
            JSONReader JSONReader = new JSONReader (_Reader);

            JSONReader.StartObject ();
            string token = JSONReader.ReadToken ();
            Out = null;

            switch (token) {

                case "QResponse" : {
                    Out = null;
                    throw new Exception ("Can't create abstract type");
                    }

                case "QueryConnectResponse" : {
                    QueryConnectResponse Result = new QueryConnectResponse ();
                    Result.Deserialize (JSONReader);
                    Out = Result;
                    break;
                    }

                case "AdvertiseResponse" : {
                    AdvertiseResponse Result = new AdvertiseResponse ();
                    Result.Deserialize (JSONReader);
                    Out = Result;
                    break;
                    }

                case "ValidateResponse" : {
                    ValidateResponse Result = new ValidateResponse ();
                    Result.Deserialize (JSONReader);
                    Out = Result;
                    break;
                    }

                case "CredentialPasswordResponse" : {
                    CredentialPasswordResponse Result = new CredentialPasswordResponse ();
                    Result.Deserialize (JSONReader);
                    Out = Result;
                    break;
                    }

                default : {
                    throw new Exception ("Not supported");
                    }
                }
            JSONReader.EndObject ();

            // should we check for EOF here?
        }