Ejemplo n.º 1
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<GridAxisRecordRepresentation2>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<dataValues type=\"ushort\">" + this._dataValues.Count.ToString(CultureInfo.InvariantCulture) + "</dataValues>");
                for (int idx = 0; idx < this._dataValues.Count; idx++)
                {
                    sb.AppendLine("<dataValues" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"FourByteChunk\">");
                    FourByteChunk aFourByteChunk = (FourByteChunk)this._dataValues[idx];
                    aFourByteChunk.Reflection(sb);
                    sb.AppendLine("</dataValues" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</GridAxisRecordRepresentation2>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<RecordQueryReliablePdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<requestID type=\"uint\">" + this._requestID.ToString(CultureInfo.InvariantCulture) + "</requestID>");
                sb.AppendLine("<requiredReliabilityService type=\"byte\">" + this._requiredReliabilityService.ToString(CultureInfo.InvariantCulture) + "</requiredReliabilityService>");
                sb.AppendLine("<pad1 type=\"ushort\">" + this._pad1.ToString(CultureInfo.InvariantCulture) + "</pad1>");
                sb.AppendLine("<pad2 type=\"byte\">" + this._pad2.ToString(CultureInfo.InvariantCulture) + "</pad2>");
                sb.AppendLine("<eventType type=\"ushort\">" + this._eventType.ToString(CultureInfo.InvariantCulture) + "</eventType>");
                sb.AppendLine("<time type=\"uint\">" + this._time.ToString(CultureInfo.InvariantCulture) + "</time>");
                sb.AppendLine("<recordIDs type=\"uint\">" + this._recordIDs.Count.ToString(CultureInfo.InvariantCulture) + "</recordIDs>");
                for (int idx = 0; idx < this._recordIDs.Count; idx++)
                {
                    sb.AppendLine("<recordIDs" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"FourByteChunk\">");
                    FourByteChunk aFourByteChunk = (FourByteChunk)this._recordIDs[idx];
                    aFourByteChunk.Reflection(sb);
                    sb.AppendLine("</recordIDs" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</RecordQueryReliablePdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }