File tree Expand file tree Collapse file tree 2 files changed +6
-16
lines changed
src/Microsoft.OpenApi/Models Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,9 @@ public ISet<OpenApiTag>? Tags
92
92
{
93
93
return ;
94
94
}
95
- if ( value is HashSet < OpenApiTag > tags && tags . Comparer is OpenApiTagComparer )
96
- {
97
- _tags = tags ;
98
- }
99
- else
100
- {
101
- _tags = new HashSet < OpenApiTag > ( value , OpenApiTagComparer . Instance ) ;
102
- }
95
+ _tags = value is HashSet < OpenApiTag > tags && tags . Comparer is OpenApiTagComparer ?
96
+ tags :
97
+ new HashSet < OpenApiTag > ( value , OpenApiTagComparer . Instance ) ;
103
98
}
104
99
}
105
100
Original file line number Diff line number Diff line change @@ -40,14 +40,9 @@ public ISet<OpenApiTagReference>? Tags
40
40
{
41
41
return ;
42
42
}
43
- if ( value is HashSet < OpenApiTagReference > tags && tags . Comparer is OpenApiTagComparer )
44
- {
45
- _tags = tags ;
46
- }
47
- else
48
- {
49
- _tags = new HashSet < OpenApiTagReference > ( value , OpenApiTagComparer . Instance ) ;
50
- }
43
+ _tags = value is HashSet < OpenApiTagReference > tags && tags . Comparer is OpenApiTagComparer ?
44
+ tags :
45
+ new HashSet < OpenApiTagReference > ( value , OpenApiTagComparer . Instance ) ;
51
46
}
52
47
}
53
48
You can’t perform that action at this time.
0 commit comments