BadScript 2
Loading...
Searching...
No Matches
PropertyModel.cs
Go to the documentation of this file.
1using System;
2
4
5public readonly struct PropertyModel : IEquatable<PropertyModel>
6{
7 public readonly string ApiParameterName;
8 public readonly string ParameterName;
9 public readonly string Type;
10 public readonly string ParameterType;
11 public readonly string Description;
12 public readonly bool IsReadOnly;
13 public PropertyModel(string parameterName, string apiParameterName, string type, string description, bool isReadOnly, string parameterType)
14 {
15 ParameterName = parameterName;
16 ApiParameterName = apiParameterName;
17 Type = type;
18 Description = description;
19 IsReadOnly = isReadOnly;
20 ParameterType = parameterType;
21 }
22
23 public bool Equals(PropertyModel other)
24 {
25 return ApiParameterName == other.ApiParameterName && ParameterName == other.ParameterName && Type == other.Type && ParameterType == other.ParameterType && Description == other.Description && IsReadOnly == other.IsReadOnly;
26 }
27 public override bool Equals(object? obj)
28 {
29 return obj is PropertyModel other && Equals(other);
30 }
31 public override int GetHashCode()
32 {
33 unchecked
34 {
35 var hashCode = ApiParameterName.GetHashCode();
36 hashCode = (hashCode * 397) ^ ParameterName.GetHashCode();
37 hashCode = (hashCode * 397) ^ Type.GetHashCode();
38 hashCode = (hashCode * 397) ^ ParameterType.GetHashCode();
39 hashCode = (hashCode * 397) ^ Description.GetHashCode();
40 hashCode = (hashCode * 397) ^ IsReadOnly.GetHashCode();
41 return hashCode;
42 }
43 }
44 public static bool operator ==(PropertyModel left, PropertyModel right)
45 {
46 return left.Equals(right);
47 }
48 public static bool operator !=(PropertyModel left, PropertyModel right)
49 {
50 return !left.Equals(right);
51 }
52}
static bool operator==(PropertyModel left, PropertyModel right)
static bool operator!=(PropertyModel left, PropertyModel right)
PropertyModel(string parameterName, string apiParameterName, string type, string description, bool isReadOnly, string parameterType)