Move RobotsTxtGenerator class to separate file
This commit is contained in:
parent
fc5c75131c
commit
57f7cb28a5
17
RobotsTxtGenerator.cs
Normal file
17
RobotsTxtGenerator.cs
Normal file
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user