Skip to content

Commit b319c5b

Browse files
committed
Update Samples
1 parent 152ea63 commit b319c5b

98 files changed

Lines changed: 81 additions & 310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,6 @@ public override int GetHashCode()
103103
if (Children != null)
104104
hashCode = (hashCode * 59) + Children.GetHashCode();
105105

106-
if (FirstName != null)
107-
hashCode = (hashCode * 59) + FirstName.GetHashCode();
108-
109-
if (LastName != null)
110-
hashCode = (hashCode * 59) + LastName.GetHashCode();
111-
112-
if (Type != null)
113-
hashCode = (hashCode * 59) + Type.GetHashCode();
114-
115106

116107
return hashCode;
117108
}

samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,6 @@ public override int GetHashCode()
119119
if (Age != null)
120120
hashCode = (hashCode * 59) + Age.GetHashCode();
121121

122-
if (FirstName != null)
123-
hashCode = (hashCode * 59) + FirstName.GetHashCode();
124-
125-
if (LastName != null)
126-
hashCode = (hashCode * 59) + LastName.GetHashCode();
127-
128-
if (Type != null)
129-
hashCode = (hashCode * 59) + Type.GetHashCode();
130-
131122
if (BoosterSeat != null)
132123
hashCode = (hashCode * 59) + BoosterSeat.GetHashCode();
133124

samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ public override bool Equals(object input)
9292
public bool Equals(Apple input)
9393
{
9494
if (input == null)
95+
{
9596
return false;
96-
97+
}
9798
return
9899
(
99-
Kind == input.Kind ||
100-
(Kind != null &&
101-
Kind.Equals(input.Kind))
100+
this.Kind == input.Kind ||
101+
(this.Kind != null &&
102+
this.Kind.Equals(input.Kind))
102103
)
103-
&& (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
104+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
104105
}
105106

106107
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ public override bool Equals(object input)
9292
public bool Equals(Banana input)
9393
{
9494
if (input == null)
95+
{
9596
return false;
96-
97+
}
9798
return
9899
(
99-
Count == input.Count ||
100-
Count.Equals(input.Count)
100+
this.Count == input.Count ||
101+
this.Count.Equals(input.Count)
101102
)
102-
&& (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
103+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
103104
}
104105

105106
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ public override bool Equals(object input)
119119
public bool Equals(Fruit input)
120120
{
121121
if (input == null)
122+
{
122123
return false;
123-
124+
}
124125
return
125126
(
126-
Color == input.Color ||
127-
(Color != null &&
128-
Color.Equals(input.Color))
127+
this.Color == input.Color ||
128+
(this.Color != null &&
129+
this.Color.Equals(input.Color))
129130
)
130-
&& (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
131+
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
131132
}
132133

133134
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ public override int GetHashCode()
9999
unchecked // Overflow is fine, just wrap
100100
{
101101
int hashCode = base.GetHashCode();
102-
hashCode = (hashCode * 59) + ClassName.GetHashCode();
103-
if (Color != null)
104-
hashCode = (hashCode * 59) + Color.GetHashCode();
105-
106102
if (Declawed != null)
107103
hashCode = (hashCode * 59) + Declawed.GetHashCode();
108104

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ public override int GetHashCode()
151151
unchecked // Overflow is fine, just wrap
152152
{
153153
int hashCode = base.GetHashCode();
154-
hashCode = (hashCode * 59) + Schema.GetHashCode();
155154
hashCode = (hashCode * 59) + CopyActivitytt.GetHashCode();
155+
hashCode = (hashCode * 59) + Schema.GetHashCode();
156156

157157
return hashCode;
158158
}

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ public override int GetHashCode()
9292
unchecked // Overflow is fine, just wrap
9393
{
9494
int hashCode = base.GetHashCode();
95-
hashCode = (hashCode * 59) + AlternativeName.GetHashCode();
9695
hashCode = (hashCode * 59) + DescendantName.GetHashCode();
97-
hashCode = (hashCode * 59) + ObjectType.GetHashCode();
9896

9997
return hashCode;
10098
}

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ public override int GetHashCode()
9292
unchecked // Overflow is fine, just wrap
9393
{
9494
int hashCode = base.GetHashCode();
95-
hashCode = (hashCode * 59) + AlternativeName.GetHashCode();
9695
hashCode = (hashCode * 59) + Confidentiality.GetHashCode();
97-
hashCode = (hashCode * 59) + ObjectType.GetHashCode();
9896

9997
return hashCode;
10098
}

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Dog.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,9 @@ public override int GetHashCode()
9999
unchecked // Overflow is fine, just wrap
100100
{
101101
int hashCode = base.GetHashCode();
102-
hashCode = (hashCode * 59) + ClassName.GetHashCode();
103102
if (Breed != null)
104103
hashCode = (hashCode * 59) + Breed.GetHashCode();
105104

106-
if (Color != null)
107-
hashCode = (hashCode * 59) + Color.GetHashCode();
108-
109105

110106
return hashCode;
111107
}

0 commit comments

Comments
 (0)