Implicit usings and more global usings

This commit is contained in:
Kwoth
2021-12-21 02:19:21 +01:00
parent 9223d78849
commit c66e491ce9
317 changed files with 272 additions and 1425 deletions

View File

@@ -1,6 +1,5 @@
using NadekoBot.Db.Models;
using Microsoft.EntityFrameworkCore;
using Discord;
using LinqToDB;
using LinqToDB.EntityFrameworkCore;
using NadekoBot.Services.Database;

View File

@@ -1,5 +1,4 @@
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db;

View File

@@ -1,7 +1,5 @@
using NadekoBot.Services.Database.Models;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common;
namespace NadekoBot.Db;

View File

@@ -1,6 +1,5 @@
using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
namespace NadekoBot.Db;

View File

@@ -1,6 +1,4 @@
using Discord;
namespace NadekoBot.Services.Database.Models;
namespace NadekoBot.Services.Database.Models;
public class DiscordPermOverride : DbEntity
{

View File

@@ -4,15 +4,26 @@ public class FilterChannelId : DbEntity
{
public ulong ChannelId { get; set; }
public override bool Equals(object obj)
{
return obj is FilterChannelId f
? f.ChannelId == ChannelId
: false;
}
public bool Equals(FilterChannelId other)
=> ChannelId == other.ChannelId;
public override int GetHashCode()
{
return ChannelId.GetHashCode();
}
public override bool Equals(object obj)
=> obj is FilterChannelId fci && Equals(fci);
public override int GetHashCode()
=> ChannelId.GetHashCode();
}
public class FilterInvitesChannelId : DbEntity
{
public ulong ChannelId { get; set; }
public bool Equals(FilterInvitesChannelId other)
=> ChannelId == other.ChannelId;
public override bool Equals(object obj)
=> obj is FilterInvitesChannelId fci && Equals(fci);
public override int GetHashCode()
=> ChannelId.GetHashCode();
}

View File

@@ -5,14 +5,9 @@ public class FilterLinksChannelId : DbEntity
public ulong ChannelId { get; set; }
public override bool Equals(object obj)
{
return obj is FilterLinksChannelId f
? f.ChannelId == ChannelId
: false;
}
=> obj is FilterLinksChannelId f
&& f.ChannelId == ChannelId;
public override int GetHashCode()
{
return ChannelId.GetHashCode();
}
public override int GetHashCode()
=> ChannelId.GetHashCode();
}

View File

@@ -1,6 +1,4 @@
using Discord;
namespace NadekoBot.Services.Database.Models;
namespace NadekoBot.Services.Database.Models;
public class RotatingPlayingStatus : DbEntity
{

View File

@@ -2,7 +2,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using NadekoBot.Services.Database.Models;
using System.IO;
using Microsoft.Extensions.Logging;
using NadekoBot.Db.Models;