Exemple #1
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<ResupplyReceivedPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<receivingEntityID>");
                this._receivingEntityID.Reflection(sb);
                sb.AppendLine("</receivingEntityID>");
                sb.AppendLine("<supplyingEntityID>");
                this._supplyingEntityID.Reflection(sb);
                sb.AppendLine("</supplyingEntityID>");
                sb.AppendLine("<supplies type=\"byte\">" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "</supplies>");
                sb.AppendLine("<padding1 type=\"short\">" + this._padding1.ToString(CultureInfo.InvariantCulture) + "</padding1>");
                sb.AppendLine("<padding2 type=\"byte\">" + this._padding2.ToString(CultureInfo.InvariantCulture) + "</padding2>");
                for (int idx = 0; idx < this._supplies.Count; idx++)
                {
                    sb.AppendLine("<supplies" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"SupplyQuantity\">");
                    SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
                    aSupplyQuantity.Reflection(sb);
                    sb.AppendLine("</supplies" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

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

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
Exemple #2
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<ServiceRequestPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<requestingEntityID>");
                this._requestingEntityID.Reflection(sb);
                sb.AppendLine("</requestingEntityID>");
                sb.AppendLine("<servicingEntityID>");
                this._servicingEntityID.Reflection(sb);
                sb.AppendLine("</servicingEntityID>");
                sb.AppendLine("<serviceTypeRequested type=\"byte\">" + this._serviceTypeRequested.ToString(CultureInfo.InvariantCulture) + "</serviceTypeRequested>");
                sb.AppendLine("<supplies type=\"byte\">" + this._supplies.Count.ToString(CultureInfo.InvariantCulture) + "</supplies>");
                sb.AppendLine("<serviceRequestPadding type=\"short\">" + this._serviceRequestPadding.ToString(CultureInfo.InvariantCulture) + "</serviceRequestPadding>");
                for (int idx = 0; idx < this._supplies.Count; idx++)
                {
                    sb.AppendLine("<supplies" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"SupplyQuantity\">");
                    SupplyQuantity aSupplyQuantity = (SupplyQuantity)this._supplies[idx];
                    aSupplyQuantity.Reflection(sb);
                    sb.AppendLine("</supplies" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

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

                this.RaiseExceptionOccured(e);

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