public override int GetMarshalledSize() { int marshalSize = 0; marshalSize = base.GetMarshalledSize(); marshalSize += 4; // this._requestID marshalSize += 1; // this._requiredReliabilityService marshalSize += 2; // this._pad1 marshalSize += 1; // this._pad2 marshalSize += 4; // this._numberOfRecordSets for (int idx = 0; idx < this._recordSets.Count; idx++) { RecordSet listElement = (RecordSet)this._recordSets[idx]; marshalSize += listElement.GetMarshalledSize(); } return(marshalSize); }
public override int GetMarshalledSize() { int marshalSize = 0; marshalSize = base.GetMarshalledSize(); marshalSize += this._orginatingEntityID.GetMarshalledSize(); // this._orginatingEntityID marshalSize += this._recevingEntityID.GetMarshalledSize(); // this._recevingEntityID marshalSize += 4; // this._requestID marshalSize += 1; // this._requiredReliabilityService marshalSize += 1; // this._tranferType marshalSize += this._transferEntityID.GetMarshalledSize(); // this._transferEntityID marshalSize += 1; // this._numberOfRecordSets for (int idx = 0; idx < this._recordSets.Count; idx++) { RecordSet listElement = (RecordSet)this._recordSets[idx]; marshalSize += listElement.GetMarshalledSize(); } return(marshalSize); }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(RecordSet obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return(false); } if (this._recordID != obj._recordID) { ivarsEqual = false; } if (this._recordSetSerialNumber != obj._recordSetSerialNumber) { ivarsEqual = false; } if (this._recordLength != obj._recordLength) { ivarsEqual = false; } if (this._recordCount != obj._recordCount) { ivarsEqual = false; } if (this._recordValues != obj._recordValues) { ivarsEqual = false; } if (this._pad4 != obj._pad4) { ivarsEqual = false; } return(ivarsEqual); }
public override void Reflection(StringBuilder sb) { sb.AppendLine("<TransferControlRequestPdu>"); base.Reflection(sb); try { sb.AppendLine("<orginatingEntityID>"); this._orginatingEntityID.Reflection(sb); sb.AppendLine("</orginatingEntityID>"); sb.AppendLine("<recevingEntityID>"); this._recevingEntityID.Reflection(sb); sb.AppendLine("</recevingEntityID>"); sb.AppendLine("<requestID type=\"uint\">" + this._requestID.ToString(CultureInfo.InvariantCulture) + "</requestID>"); sb.AppendLine("<requiredReliabilityService type=\"byte\">" + this._requiredReliabilityService.ToString(CultureInfo.InvariantCulture) + "</requiredReliabilityService>"); sb.AppendLine("<tranferType type=\"byte\">" + this._tranferType.ToString(CultureInfo.InvariantCulture) + "</tranferType>"); sb.AppendLine("<transferEntityID>"); this._transferEntityID.Reflection(sb); sb.AppendLine("</transferEntityID>"); sb.AppendLine("<recordSets type=\"byte\">" + this._recordSets.Count.ToString(CultureInfo.InvariantCulture) + "</recordSets>"); for (int idx = 0; idx < this._recordSets.Count; idx++) { sb.AppendLine("<recordSets" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"RecordSet\">"); RecordSet aRecordSet = (RecordSet)this._recordSets[idx]; aRecordSet.Reflection(sb); sb.AppendLine("</recordSets" + idx.ToString(CultureInfo.InvariantCulture) + ">"); } sb.AppendLine("</TransferControlRequestPdu>"); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(RecordSet obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (this._recordID != obj._recordID) { ivarsEqual = false; } if (this._recordSetSerialNumber != obj._recordSetSerialNumber) { ivarsEqual = false; } if (this._recordLength != obj._recordLength) { ivarsEqual = false; } if (this._recordCount != obj._recordCount) { ivarsEqual = false; } if (this._recordValues != obj._recordValues) { ivarsEqual = false; } if (this._pad4 != obj._pad4) { ivarsEqual = false; } return ivarsEqual; }