System.Threading.Tasks.Task _IPerf.ByteArrayCheck3Async(System.Int32 x, System.String y, System.Byte[] byteArray, System.String a, System.Nullable <System.Int32> xxx, System.Nullable <LightNode.Performance.MyEnum2> z, System.Threading.CancellationToken cancellationToken)
        {
            HttpContent __content = null;
            var         __multi   = new MultipartFormDataContent();

            __multi.Add(new StringContent(x.ToString()), "x");
            if (y != null)
            {
                __multi.Add(new StringContent(y), "y");
            }
            __multi.Add(new ByteArrayContent(byteArray), "byteArray");
            if (a != null)
            {
                __multi.Add(new StringContent(a), "a");
            }
            if (xxx != null)
            {
                __multi.Add(new StringContent(xxx.ToString()), "xxx");
            }
            if (z != null)
            {
                __multi.Add(new StringContent(((System.UInt64)z).ToString()), "z");
            }
            __content = __multi;
            return(PostAsync("/Perf/ByteArrayCheck3", __content, cancellationToken));
        }
        IObservable <Unit> _IPerf.Test(System.String a, System.Nullable <System.Int32> x, IProgress <float> reportProgress)
        {
            var list = new List <KeyValuePair <string, string[]> >();
            var form = new WWWForm();

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

            return(_PostAsync("Perf", "Test", form, list, reportProgress));
        }
Esempio n. 3
0
        System.Threading.Tasks.Task _IPerf.TestAsync(System.String a, System.Nullable <System.Int32> x, System.Nullable <LightNode.Performance.MyEnum2> z, System.Threading.CancellationToken cancellationToken)
        {
            var list = new List <KeyValuePair <string, string> >(3);

            if (a != null)
            {
                list.Add(new KeyValuePair <string, string>("a", a));
            }
            if (x != null)
            {
                list.Add(new KeyValuePair <string, string>("x", x.ToString()));
            }
            if (z != null)
            {
                list.Add(new KeyValuePair <string, string>("z", ((System.UInt64)z).ToString()));
            }

            return(PostAsync("/Perf/Test", new FormUrlEncodedContent(list), cancellationToken));
        }
Esempio n. 4
0
        IObservable <Unit> _IPerf.Test(System.String a, System.Nullable <System.Int32> x, System.Nullable <LightNode.Performance.MyEnum2> z, IProgress <float> reportProgress)
        {
            var form = new WWWForm();

            if (a != null)
            {
                form.AddField("a", a);
            }
            if (x != null)
            {
                form.AddField("x", x.ToString());
            }
            if (z != null)
            {
                form.AddField("z", ((System.UInt64)z).ToString());
            }

            return(_PostAsync("Perf", "Test", form, reportProgress));
        }
Esempio n. 5
0
        IEnumerator _IPerf.TestAsync(System.String a, System.Nullable <System.Int32> x, System.Nullable <LightNode.Performance.MyEnum2> z, Action <Exception> onError, Action <float> reportProgress)
        {
            var form = new WWWForm();

            if (a != null)
            {
                form.AddField("a", a);
            }
            if (x != null)
            {
                form.AddField("x", x.ToString());
            }
            if (z != null)
            {
                form.AddField("z", ((System.UInt64)z).ToString());
            }

            return(_PostAsync("/Perf/Test", form, onError, reportProgress));
        }