-
-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathParameter.cs
More file actions
41 lines (35 loc) · 1.65 KB
/
Copy pathParameter.cs
File metadata and controls
41 lines (35 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
namespace Exceptionless.Models.Data {
public class Parameter : IData {
public Parameter() {
Data = new DataDictionary();
GenericArguments = new GenericArguments();
}
public string Name { get; set; }
public string Type { get; set; }
public string TypeNamespace { get; set; }
public DataDictionary Data { get; set; }
public GenericArguments GenericArguments { get; set; }
protected bool Equals(Parameter other) {
return string.Equals(Name, other.Name) && string.Equals(Type, other.Type) && string.Equals(TypeNamespace, other.TypeNamespace) && Equals(Data, other.Data) && GenericArguments.CollectionEquals(other.GenericArguments);
}
public override bool Equals(object obj) {
if (ReferenceEquals(null, obj))
return false;
if (ReferenceEquals(this, obj))
return true;
if (obj.GetType() != this.GetType())
return false;
return Equals((Parameter)obj);
}
public override int GetHashCode() {
unchecked {
var hashCode = Name == null ? 0 : Name.GetHashCode();
hashCode = (hashCode * 397) ^ (Type == null ? 0 : Type.GetHashCode());
hashCode = (hashCode * 397) ^ (TypeNamespace == null ? 0 : TypeNamespace.GetHashCode());
hashCode = (hashCode * 397) ^ (Data == null ? 0 : Data.GetCollectionHashCode());
hashCode = (hashCode * 397) ^ (GenericArguments == null ? 0 : GenericArguments.GetCollectionHashCode());
return hashCode;
}
}
}
}