public override bool Equals(object obj) { return(obj is RecordHeader header && Prefix == header.Prefix && VersionData.Equals(header.VersionData) && Count == header.Count); }
public VersionData Read() { var versionData = new VersionData(); versionData.Revision = _reader.ReadInt32(); versionData.RevisionDate = DateTime.FromBinary(_reader.ReadInt64()); versionData.SourceFile = _reader.ReadString(); return(versionData); }
public override bool Equals(object obj) { return(obj is PowerHeader header && Count == header.Count && Prefix.Equals(header.Prefix) && VersionData.Equals(header.VersionData) && LevelVersion.Equals(header.LevelVersion) && EffectVersion.Equals(header.EffectVersion) && InventionOriginAssignmentVersion.Equals(header.InventionOriginAssignmentVersion)); }
public override int GetHashCode() { var hashCode = 2112121633; hashCode = hashCode * -1521134295 + Count.GetHashCode(); hashCode = hashCode * -1521134295 + Prefix.GetHashCode(); hashCode = hashCode * -1521134295 + VersionData.GetHashCode(); hashCode = hashCode * -1521134295 + LevelVersion.GetHashCode(); hashCode = hashCode * -1521134295 + EffectVersion.GetHashCode(); hashCode = hashCode * -1521134295 + InventionOriginAssignmentVersion.GetHashCode(); return(hashCode); }
public void Write(VersionData versionData) { _writer.Write(versionData.Revision); _writer.Write(versionData.RevisionDate.ToBinary()); _writer.Write(versionData.SourceFile); }