Skip to content

Commit

Permalink
Renamed: IImageConverter to IModPackImageConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Oct 16, 2022
1 parent 49c84c7 commit 3ed9613
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public ObservablePack(ReloadedPackReader packReader)
/// </summary>
/// <param name="packBuilder">The item builder used to build items.</param>
/// <param name="converter">The converter used to compress images.</param>
public void ToBuilder(ReloadedPackBuilder packBuilder, IImageConverter converter)
public void ToBuilder(ReloadedPackBuilder packBuilder, IModPackImageConverter converter)
{
packBuilder.SetName(Name);
packBuilder.SetReadme(Readme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public ObservablePackItem(ReloadedPackItemBuilder builder)
/// </summary>
/// <param name="itemBuilder">The item builder used to build items.</param>
/// <param name="converter">The converter used to compress images.</param>
public void ToBuilder(ReloadedPackItemBuilder itemBuilder, IImageConverter converter)
public void ToBuilder(ReloadedPackItemBuilder itemBuilder, IModPackImageConverter converter)
{
itemBuilder.SetName(Name);
itemBuilder.SetReadme(Readme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void SavePack()
/// Builds the pack stored behind this ViewModel.
/// </summary>
/// <returns>The built pack.</returns>
public MemoryStream BuildPack(IImageConverter converter)
public MemoryStream BuildPack(IModPackImageConverter converter)
{
var builder = new ReloadedPackBuilder();
Pack.ToBuilder(builder, converter);
Expand Down
2 changes: 1 addition & 1 deletion source/Reloaded.Mod.Launcher.Lib/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ private static void SetupViewModels()
{
var config = IoC.Get<LoaderConfig>();
IoC.GetConstant<MainPageViewModel>();
IoC.BindToConstant<IImageConverter>(new JxlImageConverter());
IoC.BindToConstant<IModPackImageConverter>(new JxlImageConverter());

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Reloaded.Mod.Launcher.Lib.Utility;
/// <summary>
/// Converts image to bitmap format.
/// </summary>
public class BmpImageConverter : IImageConverter
public class BmpImageConverter : IModPackImageConverter
{
/// <summary>
/// Static instance of the class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Reloaded.Mod.Launcher.Lib.Utility;
/// <summary>
/// Converts images to JPEG XL format.
/// </summary>
public class JxlImageConverter : IImageConverter
public class JxlImageConverter : IModPackImageConverter
{
/// <summary>
/// Static instance of the class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Reloaded.Mod.Loader.Tests.Update.Pack.Mocks;

public class DummyImageConverter : IImageConverter
public class DummyImageConverter : IModPackImageConverter
{
public MemoryStream Convert(Span<byte> source, string extension, out string newExtension)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Reloaded.Mod.Loader.Update.Interfaces;

/// <summary>
/// Interface that can be used to provide support for converting images.
/// Interface that can be used to provide support for converting images for the mod pack.
/// </summary>
public interface IImageConverter
public interface IModPackImageConverter
{
/// <summary>
/// Converts the image to new format.
Expand Down
4 changes: 2 additions & 2 deletions source/Reloaded.Mod.Loader.Update/Packs/AutoPackCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static bool ValidateCanCreate(IEnumerable<PathTuple<ModConfig>> configura
/// <param name="imageConverter">Used for converting images.</param>
/// <param name="packageProviders">Providers that can be used to search for packages.</param>
/// <param name="token">Token to cancel the operation.</param>
public static async Task<ReloadedPackBuilder> CreateAsync(IEnumerable<ModConfig> configurations, IImageConverter imageConverter, IList<IDownloadablePackageProvider> packageProviders, CancellationToken token = default)
public static async Task<ReloadedPackBuilder> CreateAsync(IEnumerable<ModConfig> configurations, IModPackImageConverter imageConverter, IList<IDownloadablePackageProvider> packageProviders, CancellationToken token = default)
{
var builder = new ReloadedPackBuilder();

Expand All @@ -58,7 +58,7 @@ public static async Task<ReloadedPackBuilder> CreateAsync(IEnumerable<ModConfig>
/// <param name="imageConverter">Image converter used to create the contained images.</param>
/// <param name="packageProviders">Providers used to resolve the extra package details like id and logo.</param>
/// <param name="token">Cancellation token.</param>
public static async Task<ReloadedPackItemBuilder> CreateMod(ReloadedPackBuilder builder, ModConfig config, IImageConverter imageConverter,
public static async Task<ReloadedPackItemBuilder> CreateMod(ReloadedPackBuilder builder, ModConfig config, IModPackImageConverter imageConverter,
IList<IDownloadablePackageProvider> packageProviders, CancellationToken token)
{
var imageDownloader = new ImageCacheService();
Expand Down

0 comments on commit 3ed9613

Please sign in to comment.