[cas] use file-scoped namespaces

This commit is contained in:
Andriy
2023-07-28 19:34:28 +03:00
parent c8951aad45
commit 7aed09c87c
5 changed files with 88 additions and 93 deletions
@@ -1,8 +1,8 @@
using System;
using Newtonsoft.Json;
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
{
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
internal class CombotApiResponse
{
public class ApiResult
@@ -28,4 +28,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
[JsonProperty("result")]
public ApiResult Result { get; set; }
}
}
@@ -4,8 +4,8 @@ using System.Threading.Tasks;
using Kruzya.TelegramBot.Core.Extensions;
using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
{
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
public class CombotClient : ICombotClient
{
public HttpClient _HttpClient;
@@ -27,4 +27,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
return result.IsSpammer;
}
}
}
@@ -1,11 +1,10 @@
using System.Threading.Tasks;
using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot
{
namespace Kruzya.TelegramBot.CombotAntiSpam.Combot;
public interface ICombotClient
{
public bool IsSpammer(User user);
public Task<bool> IsSpammerAsync(User user);
}
}
+2 -3
View File
@@ -2,8 +2,8 @@
using Kruzya.TelegramBot.Core;
using Microsoft.Extensions.DependencyInjection;
namespace Kruzya.TelegramBot.CombotAntiSpam
{
namespace Kruzya.TelegramBot.CombotAntiSpam;
public class CombotAntiSpam : Module
{
public CombotAntiSpam(Core.Core core) : base(core)
@@ -15,4 +15,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
services.AddSingleton<ICombotClient, CombotClient>();
}
}
}
+2 -3
View File
@@ -11,8 +11,8 @@ using Telegram.Bot;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace Kruzya.TelegramBot.CombotAntiSpam
{
namespace Kruzya.TelegramBot.CombotAntiSpam;
public class UserJoinHandler : BotEventHandler
{
protected ICombotClient _combotClient;
@@ -58,4 +58,3 @@ namespace Kruzya.TelegramBot.CombotAntiSpam
}
}
}
}