summaryrefslogtreecommitdiff
path: root/Services
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-06-14 08:22:20 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-06-14 08:22:20 +0300
commit3655495dfdb1c0024eafa4efe3d6ab745e087af0 (patch)
treeb1d535098b2f88a94945bb552df4cb0a9787b7cc /Services
parent57f7cb28a5288ea280be793776998af94773f7fe (diff)
Fix namespaces
Diffstat (limited to 'Services')
-rw-r--r--Services/IRobotsTxtGenerator.cs4
-rw-r--r--Services/RobotsTxtGenerator.cs17
2 files changed, 18 insertions, 3 deletions
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();
+ }
+}