Widow – Blame information for rev 14
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
14 | office | 1 | using System; |
2 | |||
3 | namespace Windows |
||
4 | { |
||
5 | public class WindowHash : IEquatable<WindowHash> |
||
6 | { |
||
7 | #region Public Enums, Properties and Fields |
||
8 | |||
9 | public string Title { get; } |
||
10 | |||
11 | public string Class { get; } |
||
12 | |||
13 | #endregion |
||
14 | |||
15 | #region Constructors, Destructors and Finalizers |
||
16 | |||
17 | public WindowHash(string title, string @class) |
||
18 | { |
||
19 | Title = title; |
||
20 | Class = @class; |
||
21 | } |
||
22 | |||
23 | #endregion |
||
24 | |||
25 | #region Interface |
||
26 | |||
27 | public bool Equals(WindowHash other) |
||
28 | { |
||
29 | if (ReferenceEquals(null, other)) |
||
30 | { |
||
31 | return false; |
||
32 | } |
||
33 | |||
34 | if (ReferenceEquals(this, other)) |
||
35 | { |
||
36 | return true; |
||
37 | } |
||
38 | |||
39 | return string.Equals(Title, other.Title) && string.Equals(Class, other.Class); |
||
40 | } |
||
41 | |||
42 | #endregion |
||
43 | |||
44 | #region Public Overrides |
||
45 | |||
46 | public override bool Equals(object obj) |
||
47 | { |
||
48 | if (ReferenceEquals(null, obj)) |
||
49 | { |
||
50 | return false; |
||
51 | } |
||
52 | |||
53 | if (ReferenceEquals(this, obj)) |
||
54 | { |
||
55 | return true; |
||
56 | } |
||
57 | |||
58 | if (obj.GetType() != GetType()) |
||
59 | { |
||
60 | return false; |
||
61 | } |
||
62 | |||
63 | return Equals((WindowHash) obj); |
||
64 | } |
||
65 | |||
66 | public override int GetHashCode() |
||
67 | { |
||
68 | unchecked |
||
69 | { |
||
70 | return (Title != null ? Title.GetHashCode() : 0) * 397 ^ (Class != null ? Class.GetHashCode() : 0); |
||
71 | } |
||
72 | } |
||
73 | |||
74 | #endregion |
||
75 | } |
||
76 | } |