File tree 6 files changed +7
-7
lines changed
Http/Http.Abstractions/src 6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ public override bool Equals(object? obj)
128
128
{
129
129
return ! HasValue ;
130
130
}
131
- return obj is FragmentString && Equals ( ( FragmentString ) obj ) ;
131
+ return obj is FragmentString value && Equals ( value ) ;
132
132
}
133
133
134
134
/// <summary>
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ public override bool Equals(object? obj)
298
298
{
299
299
return ! HasValue ;
300
300
}
301
- return obj is HostString && Equals ( ( HostString ) obj ) ;
301
+ return obj is HostString value && Equals ( value ) ;
302
302
}
303
303
304
304
/// <summary>
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public override bool Equals(object? obj)
41
41
return false ;
42
42
}
43
43
44
- return obj is HeaderSegment && Equals ( ( HeaderSegment ) obj ) ;
44
+ return obj is HeaderSegment value && Equals ( value ) ;
45
45
}
46
46
47
47
public override int GetHashCode ( )
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public override bool Equals(object? obj)
27
27
return false ;
28
28
}
29
29
30
- return obj is HeaderSegmentCollection && Equals ( ( HeaderSegmentCollection ) obj ) ;
30
+ return obj is HeaderSegmentCollection collection && Equals ( collection ) ;
31
31
}
32
32
33
33
public override int GetHashCode ( )
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ public override bool Equals(object? obj)
231
231
{
232
232
return ! HasValue ;
233
233
}
234
- return obj is QueryString && Equals ( ( QueryString ) obj ) ;
234
+ return obj is QueryString query && Equals ( query ) ;
235
235
}
236
236
237
237
/// <summary>
Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ protected void WriteAttribute(
193
193
// instead of the string 'true'. If the value is the bool 'false' we don't want to write anything.
194
194
// Otherwise the value is another object (perhaps an HtmlString) and we'll ask it to format itself.
195
195
string ? stringValue ;
196
- if ( value . Value is bool )
196
+ if ( value . Value is bool flag )
197
197
{
198
- if ( ( bool ) value . Value )
198
+ if ( flag )
199
199
{
200
200
stringValue = name ;
201
201
}
You can’t perform that action at this time.
0 commit comments