public override void Reflection(StringBuilder sb) { sb.AppendLine("<MinefieldStatePdu>"); base.Reflection(sb); try { sb.AppendLine("<minefieldID>"); this._minefieldID.Reflection(sb); sb.AppendLine("</minefieldID>"); sb.AppendLine("<minefieldSequence type=\"ushort\">" + this._minefieldSequence.ToString(CultureInfo.InvariantCulture) + "</minefieldSequence>"); sb.AppendLine("<forceID type=\"byte\">" + this._forceID.ToString(CultureInfo.InvariantCulture) + "</forceID>"); sb.AppendLine("<perimeterPoints type=\"byte\">" + this._perimeterPoints.Count.ToString(CultureInfo.InvariantCulture) + "</perimeterPoints>"); sb.AppendLine("<minefieldType>"); this._minefieldType.Reflection(sb); sb.AppendLine("</minefieldType>"); sb.AppendLine("<mineType type=\"ushort\">" + this._mineType.Count.ToString(CultureInfo.InvariantCulture) + "</mineType>"); sb.AppendLine("<minefieldLocation>"); this._minefieldLocation.Reflection(sb); sb.AppendLine("</minefieldLocation>"); sb.AppendLine("<minefieldOrientation>"); this._minefieldOrientation.Reflection(sb); sb.AppendLine("</minefieldOrientation>"); sb.AppendLine("<appearance type=\"ushort\">" + this._appearance.ToString(CultureInfo.InvariantCulture) + "</appearance>"); sb.AppendLine("<protocolMode type=\"ushort\">" + this._protocolMode.ToString(CultureInfo.InvariantCulture) + "</protocolMode>"); for (int idx = 0; idx < this._perimeterPoints.Count; idx++) { sb.AppendLine("<perimeterPoints" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"Point\">"); Point aPoint = (Point)this._perimeterPoints[idx]; aPoint.Reflection(sb); sb.AppendLine("</perimeterPoints" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } for (int idx = 0; idx < this._mineType.Count; idx++) { sb.AppendLine("<mineType" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityType\">"); EntityType aEntityType = (EntityType)this._mineType[idx]; aEntityType.Reflection(sb); sb.AppendLine("</mineType" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</MinefieldStatePdu>"); } 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("<AggregateStatePdu>"); base.Reflection(sb); try { sb.AppendLine("<aggregateID>"); this._aggregateID.Reflection(sb); sb.AppendLine("</aggregateID>"); sb.AppendLine("<forceID type=\"byte\">" + this._forceID.ToString(CultureInfo.InvariantCulture) + "</forceID>"); sb.AppendLine("<aggregateState type=\"byte\">" + this._aggregateState.ToString(CultureInfo.InvariantCulture) + "</aggregateState>"); sb.AppendLine("<aggregateType>"); this._aggregateType.Reflection(sb); sb.AppendLine("</aggregateType>"); sb.AppendLine("<formation type=\"uint\">" + this._formation.ToString(CultureInfo.InvariantCulture) + "</formation>"); sb.AppendLine("<aggregateMarking>"); this._aggregateMarking.Reflection(sb); sb.AppendLine("</aggregateMarking>"); sb.AppendLine("<dimensions>"); this._dimensions.Reflection(sb); sb.AppendLine("</dimensions>"); sb.AppendLine("<orientation>"); this._orientation.Reflection(sb); sb.AppendLine("</orientation>"); sb.AppendLine("<centerOfMass>"); this._centerOfMass.Reflection(sb); sb.AppendLine("</centerOfMass>"); sb.AppendLine("<velocity>"); this._velocity.Reflection(sb); sb.AppendLine("</velocity>"); sb.AppendLine("<aggregateIDList type=\"ushort\">" + this._aggregateIDList.Count.ToString(CultureInfo.InvariantCulture) + "</aggregateIDList>"); sb.AppendLine("<entityIDList type=\"ushort\">" + this._entityIDList.Count.ToString(CultureInfo.InvariantCulture) + "</entityIDList>"); sb.AppendLine("<silentAggregateSystemList type=\"ushort\">" + this._silentAggregateSystemList.Count.ToString(CultureInfo.InvariantCulture) + "</silentAggregateSystemList>"); sb.AppendLine("<silentEntitySystemList type=\"ushort\">" + this._silentEntitySystemList.Count.ToString(CultureInfo.InvariantCulture) + "</silentEntitySystemList>"); for (int idx = 0; idx < this._aggregateIDList.Count; idx++) { sb.AppendLine("<aggregateIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"AggregateID\">"); AggregateID aAggregateID = (AggregateID)this._aggregateIDList[idx]; aAggregateID.Reflection(sb); sb.AppendLine("</aggregateIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } for (int idx = 0; idx < this._entityIDList.Count; idx++) { sb.AppendLine("<entityIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityID\">"); EntityID aEntityID = (EntityID)this._entityIDList[idx]; aEntityID.Reflection(sb); sb.AppendLine("</entityIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("<pad2 type=\"byte\">" + this._pad2.ToString(CultureInfo.InvariantCulture) + "</pad2>"); for (int idx = 0; idx < this._silentAggregateSystemList.Count; idx++) { sb.AppendLine("<silentAggregateSystemList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityType\">"); EntityType aEntityType = (EntityType)this._silentAggregateSystemList[idx]; aEntityType.Reflection(sb); sb.AppendLine("</silentAggregateSystemList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } for (int idx = 0; idx < this._silentEntitySystemList.Count; idx++) { sb.AppendLine("<silentEntitySystemList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityType\">"); EntityType aEntityType = (EntityType)this._silentEntitySystemList[idx]; aEntityType.Reflection(sb); sb.AppendLine("</silentEntitySystemList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("<variableDatumList type=\"uint\">" + this._variableDatumList.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatumList>"); for (int idx = 0; idx < this._variableDatumList.Count; idx++) { sb.AppendLine("<variableDatumList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VariableDatum\">"); VariableDatum aVariableDatum = (VariableDatum)this._variableDatumList[idx]; aVariableDatum.Reflection(sb); sb.AppendLine("</variableDatumList" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</AggregateStatePdu>"); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } }