コード例 #1
0
        public virtual void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<VariableDatum>");
            try
            {
                sb.AppendLine("<variableDatumID type=\"uint\">" + this._variableDatumID.ToString(CultureInfo.InvariantCulture) + "</variableDatumID>");
                sb.AppendLine("<variableDatums type=\"uint\">" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatums>");
                for (int idx = 0; idx < this._variableDatums.Count; idx++)
                {
                    sb.AppendLine("<variableDatums" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EightByteChunk\">");
                    EightByteChunk aEightByteChunk = (EightByteChunk)this._variableDatums[idx];
                    aEightByteChunk.Reflection(sb);
                    sb.AppendLine("</variableDatums" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

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

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
コード例 #2
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<MinefieldResponseNackPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<minefieldID>");
                this._minefieldID.Reflection(sb);
                sb.AppendLine("</minefieldID>");
                sb.AppendLine("<requestingEntityID>");
                this._requestingEntityID.Reflection(sb);
                sb.AppendLine("</requestingEntityID>");
                sb.AppendLine("<requestID type=\"byte\">" + this._requestID.ToString(CultureInfo.InvariantCulture) + "</requestID>");
                sb.AppendLine("<missingPduSequenceNumbers type=\"byte\">" + this._missingPduSequenceNumbers.Count.ToString(CultureInfo.InvariantCulture) + "</missingPduSequenceNumbers>");
                for (int idx = 0; idx < this._missingPduSequenceNumbers.Count; idx++)
                {
                    sb.AppendLine("<missingPduSequenceNumbers" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EightByteChunk\">");
                    EightByteChunk aEightByteChunk = (EightByteChunk)this._missingPduSequenceNumbers[idx];
                    aEightByteChunk.Reflection(sb);
                    sb.AppendLine("</missingPduSequenceNumbers" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

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

                this.RaiseExceptionOccured(e);

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