Skip to content

Commit

Permalink
Refactor namespaces and update page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytes committed Nov 10, 2023
1 parent dbe7395 commit 84b5609
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion 14-validation/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _16_validation.Pages;
namespace Validation.Pages;

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
Expand Down
2 changes: 1 addition & 1 deletion 14-validation/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _16_validation.Pages;
namespace Validation.Pages;

public class IndexModel : PageModel
{
Expand Down
2 changes: 1 addition & 1 deletion 14-validation/Pages/Privacy.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _16_validation.Pages;
namespace Validation.Pages;

public class PrivacyModel : PageModel
{
Expand Down
8 changes: 4 additions & 4 deletions 14-validation/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - _16_validation</title>
<title>@ViewData["Title"] - Validation</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/_16_validation.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/Validation.styles.css" asp-append-version="true" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">_16_validation</a>
<a class="navbar-brand" asp-area="" asp-page="/Index">Validation</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand All @@ -38,7 +38,7 @@

<footer class="border-top footer text-muted">
<div class="container">
&copy; 2022 - _16_validation - <a asp-area="" asp-page="/Privacy">Privacy</a>
&copy; 2022 - Validation - <a asp-area="" asp-page="/Privacy">Privacy</a>
</div>
</footer>

Expand Down
4 changes: 2 additions & 2 deletions 14-validation/Pages/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@using _16_validation
@namespace _16_validation.Pages
@using Validation
@namespace Validation.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2 changes: 1 addition & 1 deletion 14-validation/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"profiles": {
"_16_validation": {
"Validation": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
2 changes: 1 addition & 1 deletion 14-validation/Validation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>_16_validation</RootNamespace>
<RootNamespace>Validation</RootNamespace>
</PropertyGroup>

</Project>
5 changes: 4 additions & 1 deletion 14-validation/WebHookSettings.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;

public class WebHookSettings
{
public const string ConfigurationSectionName = "WebHook";

[Required, Url]
public string WebhookUrl { get; set; } = string.Empty;

[Required]
[RegularExpression(@"^[a-zA-Z''-'\s]{1,20}$",
ErrorMessage = "DisplayName: {0} doesn't match RegEx")]
public string DisplayName { get; set; } = string.Empty;

public bool Enabled { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion 15-postconfig-validation/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _17_validation.Pages;
namespace Validation.Pages;

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
Expand Down
2 changes: 1 addition & 1 deletion 15-postconfig-validation/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _17_validation.Pages;
namespace Validation.Pages;

public class IndexModel : PageModel
{
Expand Down
2 changes: 1 addition & 1 deletion 15-postconfig-validation/Pages/Privacy.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace _17_validation.Pages;
namespace Validation.Pages;

public class PrivacyModel : PageModel
{
Expand Down
8 changes: 4 additions & 4 deletions 15-postconfig-validation/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - _17_validation</title>
<title>@ViewData["Title"] - Validation</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/_17_validation.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/Validation.styles.css" asp-append-version="true" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">_17_validation</a>
<a class="navbar-brand" asp-area="" asp-page="/Index">Validation</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand All @@ -38,7 +38,7 @@

<footer class="border-top footer text-muted">
<div class="container">
&copy; 2022 - _17_validation - <a asp-area="" asp-page="/Privacy">Privacy</a>
&copy; 2022 - Validation - <a asp-area="" asp-page="/Privacy">Privacy</a>
</div>
</footer>

Expand Down
4 changes: 2 additions & 2 deletions 15-postconfig-validation/Pages/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@using _17_validation
@namespace _17_validation.Pages
@using Validation
@namespace Validation.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2 changes: 1 addition & 1 deletion 15-postconfig-validation/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"profiles": {
"_17_validation": {
"Validation": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
Expand Down
2 changes: 1 addition & 1 deletion 15-postconfig-validation/Validation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>_17_validation</RootNamespace>
<RootNamespace>Validation</RootNamespace>
</PropertyGroup>

</Project>

0 comments on commit 84b5609

Please sign in to comment.