From 3655495dfdb1c0024eafa4efe3d6ab745e087af0 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 14 Jun 2023 08:22:20 +0300 Subject: Fix namespaces --- RobotsTxtGenerator.cs | 17 ----------------- Services/IRobotsTxtGenerator.cs | 4 +--- Services/RobotsTxtGenerator.cs | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 RobotsTxtGenerator.cs create mode 100644 Services/RobotsTxtGenerator.cs diff --git a/RobotsTxtGenerator.cs b/RobotsTxtGenerator.cs deleted file mode 100644 index 8417f6f..0000000 --- a/RobotsTxtGenerator.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text; - -namespace MyDarling.Controllers; - -public class RobotsTxtGenerator : IRobotsTxtGenerator -{ - public string GetRobotsText() - { - StringBuilder stringBuilder = new(); - stringBuilder.AppendLine("user-agent: *"); - stringBuilder.AppendLine("Disallow: /freedom"); - stringBuilder.AppendLine("Disallow: /Account/"); - stringBuilder.AppendLine("Disallow: /account/"); - - return stringBuilder.ToString(); - } -} diff --git a/Services/IRobotsTxtGenerator.cs b/Services/IRobotsTxtGenerator.cs index d989c8f..6f49924 100644 --- a/Services/IRobotsTxtGenerator.cs +++ b/Services/IRobotsTxtGenerator.cs @@ -1,6 +1,4 @@ -using System.Text; - -namespace MyDarling.Controllers; +namespace MyDarling.Services; public interface IRobotsTxtGenerator { diff --git a/Services/RobotsTxtGenerator.cs b/Services/RobotsTxtGenerator.cs new file mode 100644 index 0000000..26e5cee --- /dev/null +++ b/Services/RobotsTxtGenerator.cs @@ -0,0 +1,17 @@ +using System.Text; + +namespace MyDarling.Services; + +public class RobotsTxtGenerator : IRobotsTxtGenerator +{ + public string GetRobotsText() + { + StringBuilder stringBuilder = new(); + stringBuilder.AppendLine("user-agent: *"); + stringBuilder.AppendLine("Disallow: /freedom"); + stringBuilder.AppendLine("Disallow: /Account/"); + stringBuilder.AppendLine("Disallow: /account/"); + + return stringBuilder.ToString(); + } +} -- cgit v1.2.3