/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Linq; namespace wasStitchNET.Structures { public class StitchFile : IEquatable { public IEnumerable Path; public StitchPathType PathType; public string SHA1; public bool Equals(StitchFile other) { return other != null && Path.SequenceEqual(other.Path) && string.Equals(SHA1, other.SHA1, StringComparison.OrdinalIgnoreCase); } public override int GetHashCode() { return (string.Join(string.Empty, Path) + SHA1).GetHashCode(); } } }