Begun reorganizing

This commit is contained in:
Kwoth
2023-03-13 03:08:31 +01:00
parent 1ad0bc33af
commit 0af8048938
21 changed files with 58 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="OneOf" Version="3.0.223" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,7 @@
using OneOf;
using OneOf.Types;
namespace NadekoBot.Common;
namespace Nadeko.Common;
public static class BotCacheExtensions
{

View File

@@ -1,7 +1,7 @@
using OneOf;
using OneOf.Types;
namespace NadekoBot.Common;
namespace Nadeko.Common;
public interface IBotCache
{

View File

@@ -4,7 +4,7 @@ using OneOf.Types;
// ReSharper disable InconsistentlySynchronizedField
namespace NadekoBot.Common;
namespace Nadeko.Common;
public sealed class MemoryBotCache : IBotCache
{

View File

@@ -1,7 +1,7 @@
using OneOf.Types;
using OneOf;
namespace NadekoBot.Common;
namespace Nadeko.Common;
public static class OneOfExtensions
{

View File

@@ -7,7 +7,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="NonBlocking" Version="2.1.1" />
<PackageReference Include="OneOf" Version="3.0.223" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common;
namespace Nadeko.Common;
public class EventPubSub : IPubSub
{

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common;
namespace Nadeko.Common;
public interface IPubSub
{

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common;
namespace Nadeko.Common;
public interface ISeria
{

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Common;
namespace Nadeko.Common;
public readonly struct TypedKey<TData>
{

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using Nadeko.Common;
using NadekoBot.Common;
using NUnit.Framework;
using NUnit.Framework.Internal;

View File

@@ -108,6 +108,7 @@
<ProjectReference Include="..\Nadeko.Econ\Nadeko.Econ.csproj" />
<ProjectReference Include="..\Nadeko.Medusa\Nadeko.Medusa.csproj" />
<ProjectReference Include="..\NadekoBot.Generators\NadekoBot.Generators.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\NadekoBot.Modules.Expresssions\NadekoBot.Modules.Expresssions.csproj" />
</ItemGroup>
<ItemGroup>
@@ -139,6 +140,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Modules\Expressions" />
</ItemGroup>
<PropertyGroup Condition=" '$(Version)' == '' ">
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">5.0.0</VersionPrefix>

View File

@@ -5,7 +5,7 @@ namespace Ayu.Discord.Voice
{
internal static unsafe class LibOpus
{
public const string OPUS = "opus";
public const string OPUS = "data/lib/opus";
[DllImport(OPUS, EntryPoint = "opus_encoder_create", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr CreateEncoder(int Fs, int channels, int application, out OpusError error);

View File

@@ -5,7 +5,7 @@ namespace Ayu.Discord.Voice
{
internal static unsafe class Sodium
{
private const string SODIUM = "libsodium";
private const string SODIUM = "data/lib/libsodium";
[DllImport(SODIUM, EntryPoint = "crypto_secretbox_easy", CallingConvention = CallingConvention.Cdecl)]
private static extern int SecretBoxEasy(byte* output, byte* input, long inputLength, byte* nonce, byte* secret);