示例#1
0
        IEnumerator _IPerf.Echo(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, Action <LightNode.Performance.MyClass> onCompleted, Action <Exception> onError, Action <float> reportProgress)
        {
            var form = new WWWForm();

            if (name != null)
            {
                form.AddField("name", name);
            }
            form.AddField("x", x.ToString());
            form.AddField("y", y.ToString());
            form.AddField("e", ((System.Int32)e).ToString());

            return(_PostAsync <LightNode.Performance.MyClass>("/Perf/Echo", form, onCompleted, onError, reportProgress));
        }
示例#2
0
        System.Threading.Tasks.Task <LightNode.Performance.MyClass> _IPerf.EchoAsync(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, System.Threading.CancellationToken cancellationToken)
        {
            var list = new List <KeyValuePair <string, string> >(4);

            if (name != null)
            {
                list.Add(new KeyValuePair <string, string>("name", name));
            }
            list.Add(new KeyValuePair <string, string>("x", x.ToString()));
            list.Add(new KeyValuePair <string, string>("y", y.ToString()));
            list.Add(new KeyValuePair <string, string>("e", ((System.Int32)e).ToString()));

            return(PostAsync <LightNode.Performance.MyClass>("/Perf/Echo", new FormUrlEncodedContent(list), cancellationToken));
        }
        IObservable <LightNode.Performance.MyClass> _IPerf.Echo(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, IProgress <float> reportProgress)
        {
            var list = new List <KeyValuePair <string, string[]> >();
            var form = new WWWForm();

            if (name != null)
            {
                form.AddField("name", name);
                list.Add(new KeyValuePair <string, string[]>("name", new[] { name }));
            }
            form.AddField("x", x.ToString());
            list.Add(new KeyValuePair <string, string[]>("x", new[] { x.ToString() }));
            form.AddField("y", y.ToString());
            list.Add(new KeyValuePair <string, string[]>("y", new[] { y.ToString() }));
            form.AddField("e", ((System.Int32)e).ToString());
            list.Add(new KeyValuePair <string, string[]>("e", new[] { ((System.Int32)e).ToString() }));

            return(_PostAsync <LightNode.Performance.MyClass>("Perf", "Echo", form, list, reportProgress));
        }
示例#4
0
        IObservable <LightNode.Performance.MyClass> _IPerf.Echo(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, IProgress <float> reportProgress)
        {
            var form = new WWWForm();

            if (name != null)
            {
                form.AddField("name", name);
            }
            form.AddField("x", x.ToString());
            form.AddField("y", y.ToString());
            form.AddField("e", ((System.Int32)e).ToString());

            return(_PostAsync <LightNode.Performance.MyClass>("Perf", "Echo", form, reportProgress));
        }