Skip to content

Commit 39c0d5a

Browse files
committed
Smaller code cleanup
1 parent f12d749 commit 39c0d5a

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

LinkDotNet.Blog.Web/RegistrationExtensions/RegistrationHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace LinkDotNet.Blog.Web.RegistrationExtensions;
66

77
public static class RegistrationHelper
88
{
9-
public static void AssertNotAlreadyRegistered(this IServiceCollection services, Type typeTocCheck)
9+
public static void AssertNotAlreadyRegistered(this IServiceCollection services, Type typeToCheck)
1010
{
11-
var repoExists = services.Any(s => s.ServiceType == typeTocCheck);
11+
var repoExists = services.Any(s => s.ServiceType == typeToCheck);
1212
if (repoExists)
1313
{
1414
throw new NotSupportedException(
15-
$"Can't have multiple implementations registered of type {nameof(typeTocCheck)}");
15+
$"Can't have multiple implementations registered of type {nameof(typeToCheck)}");
1616
}
1717
}
1818
}

LinkDotNet.Blog.Web/Shared/ModalDialog.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
@using System.ComponentModel.DataAnnotations
2-
<div class="modal @modalClass" tabindex="-1" role="dialog" style="display:@modalDisplay; overflow-y: auto;">
1+
<div class="modal @modalClass" tabindex="-1" role="dialog" style="display:@modalDisplay; overflow-y: auto;">
32
<div class="modal-dialog modal-lg" role="document">
43
<div class="modal-content">
54
<div class="modal-header">
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
namespace LinkDotNet.Blog.Web.Shared.Services;
22

3-
public class GiscusConfiguration
3+
public record GiscusConfiguration
44
{
5-
public string Repository { get; set; }
5+
public string Repository { get; init; }
66

7-
public string RepositoryId { get; set; }
7+
public string RepositoryId { get; init; }
88

9-
public string Category { get; set; }
9+
public string Category { get; init; }
1010

11-
public string CategoryId { get; set; }
11+
public string CategoryId { get; init; }
1212
}

0 commit comments

Comments
 (0)