wasStitchNET – Blame information for rev 13

Subversion Repositories:
Rev:
Rev Author Line No. Line
13 office 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 //
3 // Please see: http://www.gnu.org/licenses/gpl.html for legal details, //
4 // rights of fair usage, the disclaimer and warranty conditions. //
5 ///////////////////////////////////////////////////////////////////////////
6  
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10  
11 namespace wasStitchNET.Structures
12 {
13 public class StitchFile : IEquatable<StitchFile>
14 {
15 public IEnumerable<string> Path;
16 public StitchPathType PathType;
17 public string SHA1;
18  
19 public bool Equals(StitchFile other)
20 {
21 return other != null && Path.SequenceEqual(other.Path) &&
22 string.Equals(SHA1, other.SHA1, StringComparison.OrdinalIgnoreCase);
23 }
24  
25 public override int GetHashCode()
26 {
27 return (string.Join(string.Empty, Path) + SHA1).GetHashCode();
28 }
29 }
30 }