Skip to content

Commit 9b5ac2e

Browse files
committed
[R] Expression-body methods
1 parent 7ea65f3 commit 9b5ac2e

33 files changed

+118
-387
lines changed

src/Simplify.Web/ApplicationBuilderExtensions.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ private static void Register(IApplicationBuilder builder)
117117
});
118118
}
119119

120-
private static void RegisterAsTerminal(IApplicationBuilder builder)
121-
{
122-
builder.Run(SimplifyWebRequestMiddleware.Invoke);
123-
}
120+
private static void RegisterAsTerminal(IApplicationBuilder builder) => builder.Run(SimplifyWebRequestMiddleware.Invoke);
124121
}
125122
}

src/Simplify.Web/Attributes/AuthorizeAttribute.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ public AuthorizeAttribute(string? requiredUserRoles = null)
2424
/// Initializes a new instance of the <see cref="AuthorizeAttribute"/> class.
2525
/// </summary>
2626
/// <param name="requiredUserRoles">The required user roles.</param>
27-
public AuthorizeAttribute(params string[] requiredUserRoles)
28-
{
29-
RequiredUserRoles = requiredUserRoles;
30-
}
27+
public AuthorizeAttribute(params string[] requiredUserRoles) => RequiredUserRoles = requiredUserRoles;
3128

3229
/// <summary>
3330
/// Gets the required user roles.

src/Simplify.Web/Attributes/ControllerRouteAttribute.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ public class ControllerRouteAttribute : Attribute
1212
/// Initializes a new instance of the <see cref="GetAttribute"/> class.
1313
/// </summary>
1414
/// <param name="route">The route.</param>
15-
public ControllerRouteAttribute(string route)
16-
{
17-
Route = route;
18-
}
15+
public ControllerRouteAttribute(string route) => Route = route;
1916

2017
/// <summary>
2118
/// Gets the route.

src/Simplify.Web/Attributes/PriorityAttribute.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ public class PriorityAttribute : Attribute
1212
/// Initializes a new instance of the <see cref="PriorityAttribute"/> class.
1313
/// </summary>
1414
/// <param name="priority">The execution priority.</param>
15-
public PriorityAttribute(int priority)
16-
{
17-
Priority = priority;
18-
}
15+
public PriorityAttribute(int priority) => Priority = priority;
1916

2017
/// <summary>
2118
/// Gets the priority.

src/Simplify.Web/Attributes/Setup/IgnoreControllersAttribute.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ public class IgnoreControllersAttribute : Attribute
1212
/// Initializes a new instance of the <see cref="IgnoreControllersAttribute"/> class.
1313
/// </summary>
1414
/// <param name="types">Controllers types which should be ignored by Simplify.Web</param>
15-
public IgnoreControllersAttribute(params Type[] types)
16-
{
17-
Types = types;
18-
}
15+
public IgnoreControllersAttribute(params Type[] types) => Types = types;
1916

2017
/// <summary>
2118
/// Gets the types of controllers.

src/Simplify.Web/Attributes/Setup/IgnoreTypesRegistrationAttribute.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ public class IgnoreTypesRegistrationAttribute : Attribute
1212
/// Initializes a new instance of the <see cref="IgnoreTypesRegistrationAttribute"/> class.
1313
/// </summary>
1414
/// <param name="types">Controllers or views types which should be ignored from DI container registration</param>
15-
public IgnoreTypesRegistrationAttribute(params Type[] types)
16-
{
17-
Types = types;
18-
}
15+
public IgnoreTypesRegistrationAttribute(params Type[] types) => Types = types;
1916

2017
/// <summary>
2118
/// Gets the types of controllers.

0 commit comments

Comments
 (0)