You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProblemDetailsproblemDetails=new(){Status=StatusCodes.Status500InternalServerError,Title="An unexpected error occurred. Please try again later.",Detail=environment.IsDevelopment()?exception.Message:null,Instance=context.Request.Path,};
Output:
ProblemDetailsproblemDetails=new(){Status=StatusCodes.Status500InternalServerError,Title="An unexpected error occurred. Please try again later.",Detail=environment.IsDevelopment()?exception.Message:null,Instance=context.Request.Path,};
Expected behavior:
Currently, when using the new() operator, the formatting applies differently than when using the explicit object constructor. The explicit constructor formats like this:
ProblemDetailsproblemDetails=newProblemDetails{Status=StatusCodes.Status500InternalServerError,Title="An unexpected error occurred. Please try again later.",Detail=environment.IsDevelopment()?exception.Message:null,Instance=context.Request.Path,};
It would be more consistent to apply the same formatting to the new() operator, like this:
ProblemDetailsproblemDetails=new(){Status=StatusCodes.Status500InternalServerError,Title="An unexpected error occurred. Please try again later.",Detail=environment.IsDevelopment()?exception.Message:null,Instance=context.Request.Path,};
The current behavior appears to contradict the formatting used for explicit object constructors.
The text was updated successfully, but these errors were encountered:
Input:
Output:
Expected behavior:
Currently, when using the
new()
operator, the formatting applies differently than when using the explicit object constructor. The explicit constructor formats like this:It would be more consistent to apply the same formatting to the
new()
operator, like this:The current behavior appears to contradict the formatting used for explicit object constructors.
The text was updated successfully, but these errors were encountered: