main
 1namespace MoMoney.Presentation.Model.FileSystem
 2{
 3    public interface IFolder
 4    {
 5        string path { get; }
 6    }
 7
 8    internal class folder : IFolder
 9    {
10        public folder(string path)
11        {
12            this.path = path;
13        }
14
15        public string path { get; private set; }
16
17        public override string ToString()
18        {
19            return path;
20        }
21
22        public bool Equals(folder obj)
23        {
24            if (ReferenceEquals(null, obj)) return false;
25            return ReferenceEquals(this, obj) || Equals(obj.path, path);
26        }
27
28        public override bool Equals(object obj)
29        {
30            if (ReferenceEquals(null, obj)) return false;
31            if (ReferenceEquals(this, obj)) return true;
32            return obj.GetType() == typeof (folder) && Equals((folder) obj);
33        }
34
35        public override int GetHashCode()
36        {
37            return (path != null ? path.GetHashCode() : 0);
38        }
39    }
40}