@@ -129,26 +129,26 @@ protected ObjectResult Problem(string detail = null, string instance = null, int
129
129
{
130
130
var problemDetails = ProblemDetailsFactory . CreateProblemDetails ( HttpContext , statusCode ?? 500 , title , type , detail , instance ) ;
131
131
132
- return new ObjectResult ( problemDetails ) { StatusCode = problemDetails . Status } ;
132
+ return new ( problemDetails ) { StatusCode = problemDetails . Status } ;
133
133
}
134
134
135
- protected ActionResult ValidationProblem ( ValidationProblemDetails descriptor )
135
+ protected BadRequestObjectResult ValidationProblem ( ValidationProblemDetails descriptor )
136
136
{
137
137
if ( descriptor is null )
138
138
{
139
139
throw new ArgumentNullException ( nameof ( descriptor ) ) ;
140
140
}
141
141
142
- return new BadRequestObjectResult ( descriptor ) ;
142
+ return new ( descriptor ) ;
143
143
}
144
144
145
- protected ActionResult ValidationProblem ( ModelStateDictionary modelState ) => ValidationProblem ( modelStateDictionary : modelState ) ;
145
+ protected ObjectResult ValidationProblem ( ModelStateDictionary modelState ) => ValidationProblem ( modelStateDictionary : modelState ) ;
146
146
147
147
protected ObjectResult ValidationProblem ( string detail = null , string instance = null , int ? statusCode = null , string title = null , string type = null , ModelStateDictionary modelStateDictionary = null )
148
148
{
149
149
var validationProblem = ProblemDetailsFactory . CreateValidationProblemDetails ( HttpContext , modelStateDictionary ?? ModelState , statusCode , title , type , detail , instance ) ;
150
150
151
- return new ObjectResult ( validationProblem ) { StatusCode = validationProblem . Status } ;
151
+ return new ( validationProblem ) { StatusCode = validationProblem . Status } ;
152
152
}
153
153
154
154
protected CreatedResult Created ( string uri , object value )
@@ -158,7 +158,7 @@ protected CreatedResult Created(string uri, object value)
158
158
throw new ArgumentNullException ( nameof ( uri ) ) ;
159
159
}
160
160
161
- return new CreatedResult ( uri , value ) ;
161
+ return new ( uri , value ) ;
162
162
}
163
163
164
164
protected CreatedResult Created ( Uri uri , object value )
@@ -168,7 +168,7 @@ protected CreatedResult Created(Uri uri, object value)
168
168
throw new ArgumentNullException ( nameof ( uri ) ) ;
169
169
}
170
170
171
- return new CreatedResult ( uri , value ) ;
171
+ return new ( uri , value ) ;
172
172
}
173
173
174
174
protected CreatedResult CreatedAtFunction ( string functionName ) => CreatedAtFunction ( functionName , null , null ) ;
@@ -187,7 +187,7 @@ protected AcceptedResult Accepted(Uri uri)
187
187
throw new ArgumentNullException ( nameof ( uri ) ) ;
188
188
}
189
189
190
- return new AcceptedResult ( uri , null ) ;
190
+ return new ( uri , null ) ;
191
191
}
192
192
193
193
protected AcceptedResult Accepted ( string uri ) => new ( uri , null ) ;
@@ -199,7 +199,7 @@ protected AcceptedResult Accepted(Uri uri, object value)
199
199
throw new ArgumentNullException ( nameof ( uri ) ) ;
200
200
}
201
201
202
- return new AcceptedResult ( uri , value ) ;
202
+ return new ( uri , value ) ;
203
203
}
204
204
205
205
protected AcceptedResult Accepted ( string uri , object value ) => new ( uri , value ) ;
@@ -213,29 +213,29 @@ protected AcceptedResult AcceptedAtFunction(string functionName, object routeVal
213
213
protected StatusCodeResult Forbid ( ) => StatusCode ( StatusCodes . Status403Forbidden ) ;
214
214
protected ObjectResult Forbid ( object value ) => StatusCode ( StatusCodes . Status403Forbidden , value ) ;
215
215
216
- protected IActionResult Proxy ( string backendUri , Action < HttpRequestMessage > beforeSend = null , Action < HttpResponseMessage > afterSend = null )
216
+ protected ProxyResult Proxy ( string backendUri , Action < HttpRequestMessage > beforeSend = null , Action < HttpResponseMessage > afterSend = null )
217
217
{
218
218
if ( backendUri is null )
219
219
{
220
220
throw new ArgumentNullException ( nameof ( backendUri ) ) ;
221
221
}
222
222
223
- return new ProxyResult ( backendUri ) { BeforeSend = beforeSend , AfterSend = afterSend } ;
223
+ return new ( backendUri ) { BeforeSend = beforeSend , AfterSend = afterSend } ;
224
224
}
225
225
226
- protected IActionResult RemoteStaticApp ( string backendUri , string fallbackExclude = null )
226
+ protected RemoteStaticAppResult RemoteStaticApp ( string backendUri , string fallbackExclude = null )
227
227
{
228
228
if ( backendUri is null )
229
229
{
230
230
throw new ArgumentNullException ( nameof ( backendUri ) ) ;
231
231
}
232
232
233
- return new RemoteStaticAppResult ( backendUri ) { FallbackExclude = fallbackExclude } ;
233
+ return new ( backendUri ) { FallbackExclude = fallbackExclude } ;
234
234
}
235
235
236
- protected IActionResult LocalStaticApp ( string defaultFile = "index.html" , string fallbackPath = "404.html" , string fallbackExclude = null )
236
+ protected LocalStaticAppResult LocalStaticApp ( string defaultFile = "index.html" , string fallbackPath = "404.html" , string fallbackExclude = null )
237
237
{
238
- return new LocalStaticAppResult { DefaultFile = defaultFile , FallbackPath = fallbackPath , FallbackExclude = fallbackExclude } ;
238
+ return new ( ) { DefaultFile = defaultFile , FallbackPath = fallbackPath , FallbackExclude = fallbackExclude } ;
239
239
}
240
240
241
241
#endregion
0 commit comments