diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-14 08:03:29 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-14 08:03:29 +0300 |
commit | 57f7cb28a5288ea280be793776998af94773f7fe (patch) | |
tree | 8564a09baf7902f35eaccf11b50be291ecb6762f | |
parent | fc5c75131c3fa4d53119646976e1d3678cfc6183 (diff) |
Move RobotsTxtGenerator class to separate file
-rw-r--r-- | RobotsTxtGenerator.cs | 17 | ||||
-rw-r--r-- | Services/IRobotsTxtGenerator.cs | 14 |
2 files changed, 17 insertions, 14 deletions
diff --git a/RobotsTxtGenerator.cs b/RobotsTxtGenerator.cs new file mode 100644 index 0000000..8417f6f --- /dev/null +++ b/RobotsTxtGenerator.cs @@ -0,0 +1,17 @@ +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 22bc5a7..d989c8f 100644 --- a/Services/IRobotsTxtGenerator.cs +++ b/Services/IRobotsTxtGenerator.cs @@ -6,17 +6,3 @@ public interface IRobotsTxtGenerator { public string GetRobotsText(); } - -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(); - } -} |