Exemplo n.º 1
0
            public Task <Xtruct> testMultiException(string arg0, string arg1, CancellationToken cancellationToken)
            {
                logger.Invoke("testMultiException({0}, {1})", arg0, arg1);
                if (arg0 == "Xception")
                {
                    var x = new Xception
                    {
                        ErrorCode = 1001,
                        Message   = "This is an Xception"
                    };
                    throw x;
                }

                if (arg0 == "Xception2")
                {
                    var x = new Xception2
                    {
                        ErrorCode    = 2002,
                        Struct_thing = new Xtruct {
                            String_thing = "This is an Xception2"
                        }
                    };
                    throw x;
                }

                var result = new Xtruct {
                    String_thing = arg1
                };

                return(Task.FromResult(result));
            }
Exemplo n.º 2
0
        public Xception2 DeepCopy()
        {
            var tmp65 = new Xception2();

            if (__isset.errorCode)
            {
                tmp65.ErrorCode = this.ErrorCode;
            }
            tmp65.__isset.errorCode = this.__isset.errorCode;
            if ((Struct_thing != null) && __isset.struct_thing)
            {
                tmp65.Struct_thing = (global::ThriftTest.Xtruct) this.Struct_thing.DeepCopy();
            }
            tmp65.__isset.struct_thing = this.__isset.struct_thing;
            return(tmp65);
        }