Esempio n. 1
0
        void postResults(GLCubeResult cubeResult)
        {
            PerformanceTestingDataService service = new PerformanceTestingDataService ();
            PerformanceCubeResult result = new PerformanceCubeResult ()
            {
                DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId,
                DeviceDatabaseIdSpecified = true,
                NumberOfTriangles = cubeResult.NumberOfTriangles,
                NumberOfTrianglesSpecified = true,
                FramesPerSecond = cubeResult.FramesPerSecond,
                FramesPerSecondSpecified = true,
                IsMonoTouch = true,
                IsMonoTouchSpecified = true
            };

            service.AddPerformanceCubeResultAsync (result);
        }
        void postButtonClicked(object sender, EventArgs e)
        {
            List<PerformanceCubeResult> results = new List<PerformanceCubeResult>(_glResults.Count);
            PerformanceTestingDataService service = new PerformanceTestingDataService ();

            for (int i=0; i<_glResults.Count; i++)
            {
                PerformanceCubeResult result = new PerformanceCubeResult ();
                result.DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId;
                result.DeviceDatabaseIdSpecified = true;
                result.NumberOfTriangles = _glResults[i].NumberOfTriangles;
                result.NumberOfTrianglesSpecified = true;
                result.FramesPerSecond = _glResults[i].FramesPerSecond;
                result.FramesPerSecondSpecified = true;
                result.IsMonoTouch = result.IsMonoTouchSpecified = true;
                results.Add (result);
            }

            service.BeginAddPerformanceCubeResults (
                    results.ToArray (), (addResult) => {
                    Console.WriteLine ("Done");
                }, null);
        }