@@ -169,23 +169,20 @@ public ApiDescription Clone()
169169
170170 extension ( ApiRequestFormat requestFormat )
171171 {
172- internal ApiRequestFormat Clone ( )
172+ internal ApiRequestFormat Clone ( ) => new ( )
173173 {
174- return new ( )
175- {
176- Formatter = requestFormat . Formatter ,
177- MediaType = requestFormat . MediaType ,
178- } ;
179- }
174+ Formatter = requestFormat . Formatter ,
175+ MediaType = requestFormat . MediaType ,
176+ } ;
180177 }
181178
182179 extension ( ApiResponseType responseType )
183180 {
184-
185181 internal ApiResponseType Clone ( )
186182 {
187183 var clone = new ApiResponseType ( )
188184 {
185+ Description = responseType . Description ,
189186 IsDefaultResponse = responseType . IsDefaultResponse ,
190187 ModelMetadata = responseType . ModelMetadata ,
191188 StatusCode = responseType . StatusCode ,
@@ -198,30 +195,24 @@ internal ApiResponseType Clone()
198195 }
199196 }
200197
201- private static ApiParameterDescription Clone ( ApiParameterDescription parameterDescription )
198+ private static ApiParameterDescription Clone ( ApiParameterDescription parameterDescription ) => new ( )
202199 {
203- return new ( )
204- {
205- BindingInfo = parameterDescription . BindingInfo ,
206- IsRequired = parameterDescription . IsRequired ,
207- DefaultValue = parameterDescription . DefaultValue ,
208- ModelMetadata = parameterDescription . ModelMetadata ,
209- Name = parameterDescription . Name ,
210- ParameterDescriptor = parameterDescription . ParameterDescriptor ,
211- RouteInfo = parameterDescription . RouteInfo ,
212- Source = parameterDescription . Source ,
213- Type = parameterDescription . Type ,
214- } ;
215- }
216-
217- private static ApiResponseFormat Clone ( ApiResponseFormat responseFormat )
200+ BindingInfo = parameterDescription . BindingInfo ,
201+ IsRequired = parameterDescription . IsRequired ,
202+ DefaultValue = parameterDescription . DefaultValue ,
203+ ModelMetadata = parameterDescription . ModelMetadata ,
204+ Name = parameterDescription . Name ,
205+ ParameterDescriptor = parameterDescription . ParameterDescriptor ,
206+ RouteInfo = parameterDescription . RouteInfo ,
207+ Source = parameterDescription . Source ,
208+ Type = parameterDescription . Type ,
209+ } ;
210+
211+ private static ApiResponseFormat Clone ( ApiResponseFormat responseFormat ) => new ( )
218212 {
219- return new ( )
220- {
221- Formatter = responseFormat . Formatter ,
222- MediaType = responseFormat . MediaType ,
223- } ;
224- }
213+ Formatter = responseFormat . Formatter ,
214+ MediaType = responseFormat . MediaType ,
215+ } ;
225216
226217 private static void CloneList < T > ( IList < T > source , IList < T > destintation , Func < T , T > clone )
227218 {
0 commit comments