| | 1 | | namespace SharpHoundCommonLib.OutputTypes |
| | 2 | | { |
| | 3 | | public class GPLink |
| | 4 | | { |
| | 5 | | private string _guid; |
| | 6 | |
|
| 12 | 7 | | public bool IsEnforced { get; set; } |
| | 8 | |
|
| | 9 | | public string GUID |
| | 10 | | { |
| 0 | 11 | | get => _guid; |
| 6 | 12 | | set => _guid = value?.ToUpper(); |
| | 13 | | } |
| | 14 | |
|
| | 15 | | protected bool Equals(GPLink other) |
| 3 | 16 | | { |
| 3 | 17 | | return _guid == other._guid && IsEnforced == other.IsEnforced; |
| 3 | 18 | | } |
| | 19 | |
|
| | 20 | | public override bool Equals(object obj) |
| 3 | 21 | | { |
| 3 | 22 | | if (ReferenceEquals(null, obj)) return false; |
| 3 | 23 | | if (ReferenceEquals(this, obj)) return true; |
| 3 | 24 | | if (obj.GetType() != GetType()) return false; |
| 3 | 25 | | return Equals((GPLink) obj); |
| 3 | 26 | | } |
| | 27 | |
|
| | 28 | | public override int GetHashCode() |
| 0 | 29 | | { |
| | 30 | | unchecked |
| 0 | 31 | | { |
| 0 | 32 | | return ((_guid != null ? _guid.GetHashCode() : 0) * 397) ^ IsEnforced.GetHashCode(); |
| | 33 | | } |
| 0 | 34 | | } |
| | 35 | | } |
| | 36 | | } |