예제 #1
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (isset.merge_data)
                {
                    hashcode = (hashcode * 397) + Merge_data.GetHashCode();
                }
                if (isset.raw_pixel_data)
                {
                    hashcode = (hashcode * 397) + Raw_pixel_data.GetHashCode();
                }
                if (isset.execution_time_ms)
                {
                    hashcode = (hashcode * 397) + Execution_time_ms.GetHashCode();
                }
                if (isset.render_time_ms)
                {
                    hashcode = (hashcode * 397) + Render_time_ms.GetHashCode();
                }
                if (isset.total_time_ms)
                {
                    hashcode = (hashcode * 397) + Total_time_ms.GetHashCode();
                }
            }
            return(hashcode);
        }
예제 #2
0
        public override string ToString()
        {
            var  sb      = new StringBuilder("TRenderStepResult(");
            bool __first = true;

            if (Merge_data != null && isset.merge_data)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Merge_data: ");
                sb.Append(Merge_data);
            }
            if (Raw_pixel_data != null && isset.raw_pixel_data)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Raw_pixel_data: ");
                sb.Append(Raw_pixel_data == null ? "<null>" : Raw_pixel_data.ToString());
            }
            if (isset.execution_time_ms)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Execution_time_ms: ");
                sb.Append(Execution_time_ms);
            }
            if (isset.render_time_ms)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Render_time_ms: ");
                sb.Append(Render_time_ms);
            }
            if (isset.total_time_ms)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Total_time_ms: ");
                sb.Append(Total_time_ms);
            }
            sb.Append(")");
            return(sb.ToString());
        }
예제 #3
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("TRenderStepResult");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (Merge_data != null && isset.merge_data)
                {
                    field.Name = "merge_data";
                    field.Type = TType.Map;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    {
                        await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.Map, Merge_data.Count), cancellationToken);

                        foreach (string _iter132 in Merge_data.Keys)
                        {
                            await oprot.WriteStringAsync(_iter132, cancellationToken);

                            {
                                await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.Map, Merge_data[_iter132].Count), cancellationToken);

                                foreach (string _iter133 in Merge_data[_iter132].Keys)
                                {
                                    await oprot.WriteStringAsync(_iter133, cancellationToken);

                                    {
                                        await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.Map, Merge_data[_iter132][_iter133].Count), cancellationToken);

                                        foreach (string _iter134 in Merge_data[_iter132][_iter133].Keys)
                                        {
                                            await oprot.WriteStringAsync(_iter134, cancellationToken);

                                            {
                                                await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.List, Merge_data[_iter132][_iter133][_iter134].Count), cancellationToken);

                                                foreach (string _iter135 in Merge_data[_iter132][_iter133][_iter134].Keys)
                                                {
                                                    await oprot.WriteStringAsync(_iter135, cancellationToken);

                                                    {
                                                        await oprot.WriteListBeginAsync(new TList(TType.Struct, Merge_data[_iter132][_iter133][_iter134][_iter135].Count), cancellationToken);

                                                        foreach (TRenderDatum _iter136 in Merge_data[_iter132][_iter133][_iter134][_iter135])
                                                        {
                                                            await _iter136.WriteAsync(oprot, cancellationToken);
                                                        }
                                                        await oprot.WriteListEndAsync(cancellationToken);
                                                    }
                                                }
                                                await oprot.WriteMapEndAsync(cancellationToken);
                                            }
                                        }
                                        await oprot.WriteMapEndAsync(cancellationToken);
                                    }
                                }
                                await oprot.WriteMapEndAsync(cancellationToken);
                            }
                        }
                        await oprot.WriteMapEndAsync(cancellationToken);
                    }
                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Raw_pixel_data != null && isset.raw_pixel_data)
                {
                    field.Name = "raw_pixel_data";
                    field.Type = TType.Struct;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await Raw_pixel_data.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.execution_time_ms)
                {
                    field.Name = "execution_time_ms";
                    field.Type = TType.I64;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Execution_time_ms, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.render_time_ms)
                {
                    field.Name = "render_time_ms";
                    field.Type = TType.I64;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Render_time_ms, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.total_time_ms)
                {
                    field.Name = "total_time_ms";
                    field.Type = TType.I64;
                    field.ID   = 5;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Total_time_ms, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                await oprot.WriteFieldStopAsync(cancellationToken);

                await oprot.WriteStructEndAsync(cancellationToken);
            }
            finally
            {
                oprot.DecrementRecursionDepth();
            }
        }