mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-15 22:22:27 +00:00
Remove useless extension classes
This commit is contained in:
parent
330c01317d
commit
ce5e327011
9 changed files with 4 additions and 40 deletions
|
@ -1,20 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Extensions;
|
||||
|
||||
internal static class ConsoleColorExtensions
|
||||
{
|
||||
internal static ConsoleColor ToDark(this ConsoleColor color)
|
||||
=> color switch
|
||||
{
|
||||
ConsoleColor.Blue => ConsoleColor.DarkBlue,
|
||||
ConsoleColor.Cyan => ConsoleColor.DarkCyan,
|
||||
ConsoleColor.Green => ConsoleColor.DarkGreen,
|
||||
ConsoleColor.Gray => ConsoleColor.DarkGray,
|
||||
ConsoleColor.Magenta => ConsoleColor.DarkMagenta,
|
||||
ConsoleColor.Red => ConsoleColor.DarkRed,
|
||||
ConsoleColor.White => ConsoleColor.Gray,
|
||||
ConsoleColor.Yellow => ConsoleColor.DarkYellow,
|
||||
_ => color,
|
||||
};
|
||||
}
|
|
@ -15,10 +15,11 @@ namespace LBPUnion.ProjectLighthouse.Extensions;
|
|||
|
||||
public static class RequestExtensions
|
||||
{
|
||||
// yoinked and adapted from https://stackoverflow.com/a/68641796
|
||||
|
||||
#region Mobile Checking
|
||||
|
||||
// yoinked and adapted from https://stackoverflow.com/a/68641796
|
||||
|
||||
private static readonly Regex mobileCheck = new
|
||||
(
|
||||
"Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|PlayStation Vita",
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Extensions;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string ToFileName(this string text) => Path.GetInvalidFileNameChars().Aggregate(text, (current, c) => current.Replace(c.ToString(), ""));
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
#nullable enable
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
|
@ -8,7 +7,6 @@ using Microsoft.EntityFrameworkCore;
|
|||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class CreateUserCommand : ICommand
|
||||
{
|
||||
private readonly Database _database = new();
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class DeleteUserCommand : ICommand
|
||||
{
|
||||
private readonly Database database = new();
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class MakeUserAdminCommand : ICommand
|
||||
{
|
||||
private readonly Database database = new();
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class ResetPasswordCommand : ICommand
|
||||
{
|
||||
private readonly Database database = new();
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class TestWebhookCommand : ICommand
|
||||
{
|
||||
public async Task Run(string[] args)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Maintenance;
|
||||
|
||||
[UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)]
|
||||
public interface ICommand
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue