Skip to content

Commit

Permalink
Update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkitic committed Nov 7, 2022
1 parent a5d6140 commit b5a14c9
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 26 deletions.
2 changes: 1 addition & 1 deletion KeyAsio.Gui/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
using KeyAsio.Gui.Realtime;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Windows;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using OsuRTDataProvider;
using OsuRTDataProvider.Listen;
using OrtdpLogger = OsuRTDataProvider.Logger;
using OrtdpSetting = OsuRTDataProvider.Setting;
Expand Down
19 changes: 12 additions & 7 deletions KeyAsio.Gui/KeyAsio.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<OutputType>Exe</OutputType>
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
</PropertyGroup>

<ItemGroup>
<ApplicationDefinition Remove="App.xaml" />
</ItemGroup>
Expand All @@ -30,20 +35,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Coosu.Beatmap" Version="2.3.10" />
<PackageReference Include="Coosu.Beatmap" Version="2.3.27" />
<PackageReference Include="HandyControl" Version="3.3.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Milki.Extensions.Configuration" Version="0.0.26" />
<PackageReference Include="Milki.Extensions.MixPlayer" Version="0.0.25" />
<PackageReference Include="Milki.Extensions.MouseKeyHook" Version="0.0.25" />
<PackageReference Include="MinVer" Version="4.1.0">
<PackageReference Include="Milki.Extensions.Configuration" Version="0.0.30" />
<PackageReference Include="Milki.Extensions.MixPlayer" Version="0.0.30" />
<PackageReference Include="Milki.Extensions.MouseKeyHook" Version="0.0.30" />
<PackageReference Include="MinVer" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog.Extensions.Logging" Version="5.0.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.1.0" />
<PackageReference Include="Semver" Version="2.2.0" />
<PackageReference Include="YamlDotNet" Version="12.0.0" />
<PackageReference Include="YamlDotNet" Version="12.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/AudioProviders/ManiaAudioProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using OsuRTDataProvider;

namespace KeyAsio.Gui.Realtime.AudioProviders;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using OsuRTDataProvider;

namespace KeyAsio.Gui.Realtime.AudioProviders;

Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/ConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using Coosu.Shared.IO;
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using Milki.Extensions.MouseKeyHook;
using OsuRTDataProvider;

namespace KeyAsio.Gui.Realtime;

Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/RealtimeModeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
using KeyAsio.Gui.Realtime.Tracks;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using Milki.Extensions.MixPlayer.NAudioExtensions.Wave;
using NAudio.Wave;
using OsuRTDataProvider;
using OsuRTDataProvider.BeatmapInfo;
using OsuRTDataProvider.Listen;
using OsuRTDataProvider.Mods;
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/SkinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
using System.Windows;
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using Microsoft.Extensions.Logging;
using Microsoft.Win32;
using Milki.Extensions.Configuration;
using Milki.Extensions.MixPlayer.NAudioExtensions.Wave;
using OsuRTDataProvider;
using OsuRTDataProvider.Listen;

namespace KeyAsio.Gui.Realtime;
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/Tracks/SelectSongTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using Milki.Extensions.MixPlayer.NAudioExtensions.Wave;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using OsuRTDataProvider;
using FadeInOutSampleProvider = KeyAsio.Gui.Waves.FadeInOutSampleProvider;

namespace KeyAsio.Gui.Realtime.Tracks;
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Realtime/Tracks/SingleSynchronousTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using KeyAsio.Gui.Models;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using Milki.Extensions.MixPlayer.NAudioExtensions.Wave;
using NAudio.Wave;
using OsuRTDataProvider;
using OsuRTDataProvider.Mods;

namespace KeyAsio.Gui.Realtime.Tracks;
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Utils/DebugUtils.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Diagnostics;
using System.Text;
using Microsoft.Extensions.Logging;
using OsuRTDataProvider;

namespace KeyAsio.Gui.Utils;

Expand Down
8 changes: 2 additions & 6 deletions KeyAsio.Gui/Utils/LogUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
using System.Text;
using KeyAsio.Gui.Configuration;
using KeyAsio.Gui.Realtime;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using NLog.Extensions.Logging;
using OsuRTDataProvider;
using Sentry;

namespace KeyAsio.Gui.Utils;

internal static class LogUtils
{
public static readonly ILoggerFactory LoggerFactory =
Microsoft.Extensions.Logging.LoggerFactory.Create(k => k
.AddNLog()
.SetMinimumLevel(LogLevel.Trace));
public static readonly ILoggerFactory LoggerFactory = WrapperLoggerFactory.CreateFromExtensions();

public static ILogger GetLogger(string name)
{
Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Utils/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using OsuRTDataProvider;
using Semver;

namespace KeyAsio.Gui.Utils;
Expand Down
27 changes: 27 additions & 0 deletions KeyAsio.Gui/Utils/WrapperLogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Microsoft.Extensions.Logging;
using LogLevel = OsuRTDataProvider.LogLevel;

namespace KeyAsio.Gui.Utils;

internal class WrapperLogger<T> : OsuRTDataProvider.ILogger<T>
{
private readonly ILogger _innerLogger;
public WrapperLogger(ILogger innerLogger) => _innerLogger = innerLogger;
public void Log(LogLevel logLevel, string message) => _innerLogger.Log((Microsoft.Extensions.Logging.LogLevel)logLevel, message);
public void LogInformation(string message) => _innerLogger.LogInformation(message);
public void LogDebug(string message) => _innerLogger.LogDebug(message);
public void LogError(string message) => _innerLogger.LogError(message);
public void LogWarning(string message) => _innerLogger.LogWarning(message);
public void LogInformation(Exception exception, string message) => _innerLogger.LogInformation(exception, message);
public void LogDebug(Exception exception, string message) => _innerLogger.LogDebug(exception, message);
public void LogError(Exception exception, string message) => _innerLogger.LogError(exception, message);
public void LogWarning(Exception exception, string message) => _innerLogger.LogWarning(exception, message);
}

internal class WrapperLogger : WrapperLogger<object>
{
public WrapperLogger(ILogger innerLogger) : base(innerLogger)
{
}
}
20 changes: 20 additions & 0 deletions KeyAsio.Gui/Utils/WrapperLoggerFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;

namespace KeyAsio.Gui.Utils;

internal class WrapperLoggerFactory : OsuRTDataProvider.ILoggerFactory
{
private readonly ILoggerFactory _loggerFactory;

public WrapperLoggerFactory(ILoggerFactory loggerFactory)
{
_loggerFactory = loggerFactory;
}

public OsuRTDataProvider.ILogger CreateLogger(string name) => new WrapperLogger(_loggerFactory.CreateLogger(name));
public OsuRTDataProvider.ILogger<T> CreateLogger<T>() => new WrapperLogger<T>(_loggerFactory.CreateLogger<T>());

public static WrapperLoggerFactory CreateFromExtensions() =>
new(LoggerFactory.Create(k => k.AddNLog().SetMinimumLevel(LogLevel.Trace)));
}
2 changes: 1 addition & 1 deletion KeyAsio.Gui/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
using KeyAsio.Gui.UserControls;
using KeyAsio.Gui.Utils;
using KeyAsio.Gui.Waves;
using Microsoft.Extensions.Logging;
using Milki.Extensions.Configuration;
using Milki.Extensions.MixPlayer.Devices;
using Milki.Extensions.MixPlayer.NAudioExtensions.Wave;
using Milki.Extensions.MouseKeyHook;
using NAudio.Wave;
using OsuRTDataProvider;

namespace KeyAsio.Gui.Windows;

Expand Down
2 changes: 1 addition & 1 deletion KeyAsio.Sentry/KeyAsio.Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Sentry" Version="3.20.1" />
<PackageReference Include="Sentry" Version="3.23.1" />
</ItemGroup>

<Target Condition="$(Configuration) != 'Release'" Name="PreBuild" BeforeTargets="PreBuildEvent">
Expand Down
2 changes: 1 addition & 1 deletion dependencies/OsuRTDataProviderCore

0 comments on commit b5a14c9

Please sign in to comment.