Пример #1
0
 public static PitData Clone(PitData pData)
 {
     using (MemoryStream stream = new MemoryStream())
     {
         BinaryFormatter formatter = new BinaryFormatter();
         formatter.Serialize(stream, pData);
         stream.Position = 0L;
         return((PitData)formatter.Deserialize(stream));
     }
 }
Пример #2
0
 public bool Matches(PitData otherPitData)
 {
     if (!((((((this._entryCount == otherPitData._entryCount) & this.CompareByteArray(this._dummyData1, otherPitData._dummyData1)) & this.CompareByteArray(this._dummyData2, otherPitData._dummyData2)) & this.CompareByteArray(this._dummyData3, otherPitData._dummyData3)) & this.CompareByteArray(this._dummyData4, otherPitData._dummyData4)) & this.CompareByteArray(this._dummyData5, otherPitData._dummyData5)))
     {
         return(false);
     }
     for (int i = 0; i < this._entryCount; i++)
     {
         PitEntry entry         = this._entries[i];
         PitEntry otherPitEntry = otherPitData._entries[i];
         if (Conversions.ToBoolean(Operators.NotObject(entry.Matches(otherPitEntry))))
         {
             return(false);
         }
     }
     return(true);
 }