Skip to content

Commit 7c73448

Browse files
committed
Up Bump .NET SDK from 5.0.100 to 5.0.102
1 parent 92aad1a commit 7c73448

33 files changed

+167
-344
lines changed

Source/Boxed.AspNetCore.Swagger/OperationFilters/ForbiddenResponseOperationFilter.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ private static bool HasAuthorizationRequirement(
4949
{
5050
foreach (var authorizationRequirement in authorizationRequirements)
5151
{
52-
if (authorizationRequirement is ClaimsAuthorizationRequirement ||
53-
authorizationRequirement is NameAuthorizationRequirement ||
54-
authorizationRequirement is OperationAuthorizationRequirement ||
55-
authorizationRequirement is RolesAuthorizationRequirement ||
56-
authorizationRequirement is AssertionRequirement)
52+
if (authorizationRequirement is ClaimsAuthorizationRequirement or
53+
NameAuthorizationRequirement or
54+
OperationAuthorizationRequirement or
55+
RolesAuthorizationRequirement or
56+
AssertionRequirement)
5757
{
5858
return true;
5959
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/DayOfWeekExtensions.cs

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,17 @@ internal static class DayOfWeekExtensions
1414
/// <returns>
1515
/// The lower-case <see cref="string" /> representation of the <see cref="DayOfWeek" />.
1616
/// </returns>
17-
public static string ToLowercaseString(this DayOfWeek dayOfWeek)
18-
{
19-
switch (dayOfWeek)
17+
public static string ToLowercaseString(this DayOfWeek dayOfWeek) =>
18+
dayOfWeek switch
2019
{
21-
case DayOfWeek.Friday:
22-
return "friday";
23-
case DayOfWeek.Monday:
24-
return "monday";
25-
case DayOfWeek.Saturday:
26-
return "saturday";
27-
case DayOfWeek.Sunday:
28-
return "sunday";
29-
case DayOfWeek.Thursday:
30-
return "thursday";
31-
case DayOfWeek.Tuesday:
32-
return "tuesday";
33-
case DayOfWeek.Wednesday:
34-
return "wednesday";
35-
default:
36-
return string.Empty;
37-
}
38-
}
20+
DayOfWeek.Friday => "friday",
21+
DayOfWeek.Monday => "monday",
22+
DayOfWeek.Saturday => "saturday",
23+
DayOfWeek.Sunday => "sunday",
24+
DayOfWeek.Thursday => "thursday",
25+
DayOfWeek.Tuesday => "tuesday",
26+
DayOfWeek.Wednesday => "wednesday",
27+
_ => string.Empty,
28+
};
3929
}
4030
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphAgeGroupExtensions.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ internal static class OpenGraphAgeGroupExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphAgeGroup" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphAgeGroup openGraphAgeGroup)
16-
{
17-
switch (openGraphAgeGroup)
15+
public static string ToLowercaseString(this OpenGraphAgeGroup openGraphAgeGroup) =>
16+
openGraphAgeGroup switch
1817
{
19-
case OpenGraphAgeGroup.Adult:
20-
return "adult";
21-
case OpenGraphAgeGroup.Kids:
22-
return "kids";
23-
default:
24-
return string.Empty;
25-
}
26-
}
18+
OpenGraphAgeGroup.Adult => "adult",
19+
OpenGraphAgeGroup.Kids => "kids",
20+
_ => string.Empty,
21+
};
2722
}
2823
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphAvailabilityExtensions.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ internal static class OpenGraphAvailabilityExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphAvailability" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphAvailability openGraphAvailability)
16-
{
17-
switch (openGraphAvailability)
15+
public static string ToLowercaseString(this OpenGraphAvailability openGraphAvailability) =>
16+
openGraphAvailability switch
1817
{
19-
case OpenGraphAvailability.InStock:
20-
return "instock";
21-
case OpenGraphAvailability.OutOfStock:
22-
return "oos";
23-
case OpenGraphAvailability.Pending:
24-
return "pending";
25-
default:
26-
return string.Empty;
27-
}
28-
}
18+
OpenGraphAvailability.InStock => "instock",
19+
OpenGraphAvailability.OutOfStock => "oos",
20+
OpenGraphAvailability.Pending => "pending",
21+
_ => string.Empty,
22+
};
2923
}
3024
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphConditionExtensions.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ internal static class OpenGraphConditionExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphCondition" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphCondition openGraphCondition)
16-
{
17-
switch (openGraphCondition)
15+
public static string ToLowercaseString(this OpenGraphCondition openGraphCondition) =>
16+
openGraphCondition switch
1817
{
19-
case OpenGraphCondition.New:
20-
return "new";
21-
case OpenGraphCondition.Refurbished:
22-
return "refurbished";
23-
case OpenGraphCondition.Used:
24-
return "used";
25-
default:
26-
return string.Empty;
27-
}
28-
}
18+
OpenGraphCondition.New => "new",
19+
OpenGraphCondition.Refurbished => "refurbished",
20+
OpenGraphCondition.Used => "used",
21+
_ => string.Empty,
22+
};
2923
}
3024
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphDeterminerExtensions.cs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@ internal static class OpenGraphDeterminerExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphDeterminer" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphDeterminer determiner)
16-
{
17-
switch (determiner)
15+
public static string ToLowercaseString(this OpenGraphDeterminer determiner) =>
16+
determiner switch
1817
{
19-
case OpenGraphDeterminer.A:
20-
return "a";
21-
case OpenGraphDeterminer.An:
22-
return "an";
23-
case OpenGraphDeterminer.Auto:
24-
return "auto";
25-
case OpenGraphDeterminer.The:
26-
return "the";
27-
case OpenGraphDeterminer.Blank:
28-
default:
29-
return string.Empty;
30-
}
31-
}
18+
OpenGraphDeterminer.A => "a",
19+
OpenGraphDeterminer.An => "an",
20+
OpenGraphDeterminer.Auto => "auto",
21+
OpenGraphDeterminer.The => "the",
22+
OpenGraphDeterminer.Blank => string.Empty,
23+
_ => string.Empty,
24+
};
3225
}
3326
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphGenderExtensions.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ internal static class OpenGraphGenderExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphGender" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphGender gender)
16-
{
17-
switch (gender)
15+
public static string ToLowercaseString(this OpenGraphGender gender) =>
16+
gender switch
1817
{
19-
case OpenGraphGender.Male:
20-
return "male";
21-
case OpenGraphGender.Female:
22-
return "female";
23-
default:
24-
return string.Empty;
25-
}
26-
}
18+
OpenGraphGender.Male => "male",
19+
OpenGraphGender.Female => "female",
20+
_ => string.Empty,
21+
};
2722
}
2823
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphMusicReleaseTypeExtensions.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ internal static class OpenGraphMusicReleaseTypeExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphMusicReleaseType" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphMusicReleaseType musicReleaseType)
16-
{
17-
switch (musicReleaseType)
15+
public static string ToLowercaseString(this OpenGraphMusicReleaseType musicReleaseType) =>
16+
musicReleaseType switch
1817
{
19-
case OpenGraphMusicReleaseType.OriginalRelease:
20-
return "original_release";
21-
case OpenGraphMusicReleaseType.ReRelease:
22-
return "re_release";
23-
case OpenGraphMusicReleaseType.Anthology:
24-
return "anthology";
25-
default:
26-
return string.Empty;
27-
}
28-
}
18+
OpenGraphMusicReleaseType.OriginalRelease => "original_release",
19+
OpenGraphMusicReleaseType.ReRelease => "re_release",
20+
OpenGraphMusicReleaseType.Anthology => "anthology",
21+
_ => string.Empty,
22+
};
2923
}
3024
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphTargetGenderExtensions.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ internal static class OpenGraphTargetGenderExtensions
1212
/// <returns>
1313
/// The lower-case <see cref="string" /> representation of the <see cref="OpenGraphTargetGender" />.
1414
/// </returns>
15-
public static string ToLowercaseString(this OpenGraphTargetGender gender)
16-
{
17-
switch (gender)
15+
public static string ToLowercaseString(this OpenGraphTargetGender gender) =>
16+
gender switch
1817
{
19-
case OpenGraphTargetGender.Male:
20-
return "male";
21-
case OpenGraphTargetGender.Female:
22-
return "female";
23-
case OpenGraphTargetGender.Unisex:
24-
return "unisex";
25-
default:
26-
return string.Empty;
27-
}
28-
}
18+
OpenGraphTargetGender.Male => "male",
19+
OpenGraphTargetGender.Female => "female",
20+
OpenGraphTargetGender.Unisex => "unisex",
21+
_ => string.Empty,
22+
};
2923
}
3024
}

Source/Boxed.AspNetCore.TagHelpers/OpenGraph/Enums/OpenGraphTypeExtensions.cs

Lines changed: 30 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,64 +10,36 @@ internal static class OpenGraphTypeExtensions
1010
/// </summary>
1111
/// <param name="type">The type.</param>
1212
/// <returns>The lower-case <see cref="string"/> representation of the <see cref="OpenGraphType"/>.</returns>
13-
public static string ToLowercaseString(this OpenGraphType type)
14-
{
15-
switch (type)
13+
public static string ToLowercaseString(this OpenGraphType type) =>
14+
type switch
1615
{
17-
case OpenGraphType.Article:
18-
return "article";
19-
case OpenGraphType.Book:
20-
return "book";
21-
case OpenGraphType.BooksAuthor:
22-
return "books.author";
23-
case OpenGraphType.BooksBook:
24-
return "books.book";
25-
case OpenGraphType.BooksGenre:
26-
return "books.genre";
27-
case OpenGraphType.Business:
28-
return "business.business";
29-
case OpenGraphType.FitnessCourse:
30-
return "fitness.course";
31-
case OpenGraphType.GameAchievement:
32-
return "game.achievement";
33-
case OpenGraphType.MusicAlbum:
34-
return "music.album";
35-
case OpenGraphType.MusicPlaylist:
36-
return "music.playlist";
37-
case OpenGraphType.MusicRadioStation:
38-
return "music.radio_station";
39-
case OpenGraphType.MusicSong:
40-
return "music.song";
41-
case OpenGraphType.Place:
42-
return "place";
43-
case OpenGraphType.Product:
44-
return "product";
45-
case OpenGraphType.ProductGroup:
46-
return "product.group";
47-
case OpenGraphType.ProductItem:
48-
return "product.item";
49-
case OpenGraphType.Profile:
50-
return "profile";
51-
case OpenGraphType.RestaurantMenu:
52-
return "restaurant.menu";
53-
case OpenGraphType.RestaurantMenuItem:
54-
return "restaurant.menu_item";
55-
case OpenGraphType.RestaurantMenuSection:
56-
return "restaurant.menu_section";
57-
case OpenGraphType.Restaurant:
58-
return "restaurant.restaurant";
59-
case OpenGraphType.VideoEpisode:
60-
return "video.episode";
61-
case OpenGraphType.VideoMovie:
62-
return "video.movie";
63-
case OpenGraphType.VideoOther:
64-
return "video.other";
65-
case OpenGraphType.VideoTvShow:
66-
return "video.tv_show";
67-
case OpenGraphType.Website:
68-
default:
69-
return "website";
70-
}
71-
}
16+
OpenGraphType.Article => "article",
17+
OpenGraphType.Book => "book",
18+
OpenGraphType.BooksAuthor => "books.author",
19+
OpenGraphType.BooksBook => "books.book",
20+
OpenGraphType.BooksGenre => "books.genre",
21+
OpenGraphType.Business => "business.business",
22+
OpenGraphType.FitnessCourse => "fitness.course",
23+
OpenGraphType.GameAchievement => "game.achievement",
24+
OpenGraphType.MusicAlbum => "music.album",
25+
OpenGraphType.MusicPlaylist => "music.playlist",
26+
OpenGraphType.MusicRadioStation => "music.radio_station",
27+
OpenGraphType.MusicSong => "music.song",
28+
OpenGraphType.Place => "place",
29+
OpenGraphType.Product => "product",
30+
OpenGraphType.ProductGroup => "product.group",
31+
OpenGraphType.ProductItem => "product.item",
32+
OpenGraphType.Profile => "profile",
33+
OpenGraphType.RestaurantMenu => "restaurant.menu",
34+
OpenGraphType.RestaurantMenuItem => "restaurant.menu_item",
35+
OpenGraphType.RestaurantMenuSection => "restaurant.menu_section",
36+
OpenGraphType.Restaurant => "restaurant.restaurant",
37+
OpenGraphType.VideoEpisode => "video.episode",
38+
OpenGraphType.VideoMovie => "video.movie",
39+
OpenGraphType.VideoOther => "video.other",
40+
OpenGraphType.VideoTvShow => "video.tv_show",
41+
OpenGraphType.Website => "website",
42+
_ => "website",
43+
};
7244
}
7345
}

0 commit comments

Comments
 (0)