File tree 13 files changed +26
-53
lines changed
MinecraftJars.Core/Providers
MinecraftJars.Extension/MinecraftJars.Extension.DependencyInjection
MinecraftJars.Plugin.Fabric
MinecraftJars.Plugin.Mohist
MinecraftJars.Plugin.Mojang
MinecraftJars.Plugin.Paper
MinecraftJars.Plugin.Pocketmine
MinecraftJars.Plugin.Purpur
MinecraftJars.Plugin.Spigot
13 files changed +26
-53
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file.
3
3
4
4
## [ Unreleased]
5
5
6
+ ## [ 1.4.2] - 2023-06-03
7
+
8
+ ### Removed
9
+ - Removed ProviderOptions as it had no use and created an unnecessary dependency
10
+
11
+ ### Added
12
+ - Added MinecraftJarOptions so the optional IHttpClientFactory can be provided
13
+
14
+ ### Fixed
15
+ - Removed unnecessary dependency of MinecraftJars.Core causing Nuget installation to fail
16
+
17
+
6
18
## [ 1.4.1] - 2023-06-03
7
19
8
20
### Changed
Original file line number Diff line number Diff line change @@ -5,11 +5,6 @@ namespace MinecraftJars.Core.Providers;
5
5
6
6
public interface IMinecraftProvider
7
7
{
8
- /// <summary>
9
- /// The options the provider manager has been provided with
10
- /// </summary>
11
- ProviderOptions ProviderOptions { get ; }
12
-
13
8
/// <summary>
14
9
/// Name of the provider e.g. Mojang, PaperMC, etc.
15
10
/// </summary>
Original file line number Diff line number Diff line change 24
24
</ItemGroup >
25
25
26
26
<ItemGroup >
27
- <ProjectReference Include =" ..\..\MinecraftJars.Core\MinecraftJars.Core.csproj" />
28
27
<ProjectReference Include =" ..\..\MinecraftJars\MinecraftJars.csproj" />
29
28
</ItemGroup >
30
29
Original file line number Diff line number Diff line change 1
1
using Microsoft . Extensions . DependencyInjection ;
2
- using MinecraftJars . Core . Providers ;
3
2
4
3
namespace MinecraftJars . Extension . DependencyInjection ;
5
4
@@ -8,7 +7,7 @@ public static class ServiceCollectionExtensions
8
7
public static IServiceCollection AddMinecraftJar ( this IServiceCollection services )
9
8
{
10
9
services . AddHttpClient ( ) ;
11
- services . AddScoped < IMinecraftJar , MinecraftJar > ( sp => new MinecraftJar ( new ProviderOptions
10
+ services . AddScoped < IMinecraftJar , MinecraftJar > ( sp => new MinecraftJar ( new MinecraftJarOptions ( )
12
11
{
13
12
HttpClientFactory = sp . GetRequiredService < IHttpClientFactory > ( )
14
13
} ) ) ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Fabric;
10
10
public class FabricProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public FabricProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public FabricProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
FabricVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Fabric" ;
23
19
public byte [ ] Logo => Properties . Resources . Fabric ;
24
20
public IEnumerable < IMinecraftProject > Projects => FabricProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Mohist;
10
10
public class MohistProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public MohistProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public MohistProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
MohistVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Mohist" ;
23
19
public byte [ ] Logo => Properties . Resources . Mohist ;
24
20
public IEnumerable < IMinecraftProject > Projects => MohistProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Mojang;
10
10
public class MojangProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public MojangProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public MojangProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
MojangVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Mojang" ;
23
19
public byte [ ] Logo => Properties . Resources . Mojang ;
24
20
public IEnumerable < IMinecraftProject > Projects => MojangProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Paper;
10
10
public class PaperProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public PaperProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public PaperProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
PaperVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Paper" ;
23
19
public byte [ ] Logo => Properties . Resources . Paper ;
24
20
public IEnumerable < IMinecraftProject > Projects => PaperProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Pocketmine;
10
10
public class PocketmineProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public PocketmineProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public PocketmineProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
PocketmineVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Pocketmine" ;
23
19
public byte [ ] Logo => Properties . Resources . Pocketmine ;
24
20
public IEnumerable < IMinecraftProject > Projects => PocketmineProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Purpur;
10
10
public class PurpurProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public PurpurProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public PurpurProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
PurpurVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Purpur" ;
23
19
public byte [ ] Logo => Properties . Resources . Purpur ;
24
20
public IEnumerable < IMinecraftProject > Projects => PurpurProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ namespace MinecraftJars.Plugin.Spigot;
10
10
public class SpigotProvider : IMinecraftProvider
11
11
{
12
12
[ ImportingConstructor ]
13
- public SpigotProvider (
14
- PluginHttpClientFactory httpClientFactory ,
15
- ProviderOptions ? options )
13
+ public SpigotProvider ( PluginHttpClientFactory httpClientFactory )
16
14
{
17
15
SpigotVersionFactory . HttpClientFactory = httpClientFactory ;
18
- ProviderOptions = options ?? new ProviderOptions ( ) ;
19
16
}
20
17
21
- public ProviderOptions ProviderOptions { get ; }
22
18
public string Name => "Spigot" ;
23
19
public byte [ ] Logo => Properties . Resources . Spigot ;
24
20
public IEnumerable < IMinecraftProject > Projects => SpigotProjectFactory . Projects ;
Original file line number Diff line number Diff line change @@ -12,16 +12,12 @@ public class MinecraftJar : IMinecraftJar
12
12
[ ImportMany ( typeof ( IMinecraftProvider ) ) ]
13
13
private IEnumerable < IMinecraftProvider > _providers ;
14
14
15
- [ Export ]
16
- private ProviderOptions ProviderOptions { get ; }
17
-
18
15
[ Export ]
19
16
private PluginHttpClientFactory HttpClientFactory { get ; }
20
-
21
- public MinecraftJar ( ProviderOptions ? options = null )
17
+
18
+ public MinecraftJar ( MinecraftJarOptions ? options = null )
22
19
{
23
- ProviderOptions = options ?? new ProviderOptions ( ) ;
24
- HttpClientFactory = new PluginHttpClientFactory ( ProviderOptions . HttpClientFactory ) ;
20
+ HttpClientFactory = new PluginHttpClientFactory ( options ? . HttpClientFactory ) ;
25
21
26
22
var path = Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ?? "." ;
27
23
var catalog = new AggregateCatalog ( ) ;
Original file line number Diff line number Diff line change 1
- namespace MinecraftJars . Core . Providers ;
1
+ namespace MinecraftJars ;
2
2
3
- public class ProviderOptions
3
+ public class MinecraftJarOptions
4
4
{
5
5
/// <summary>
6
6
/// If provided the CreateClient Method is utilized to create a HttpClient
7
7
/// otherwise a new HttpClient is instantiated by the MinecraftJarManager
8
8
/// </summary>
9
- public IHttpClientFactory ? HttpClientFactory { get ; init ; }
9
+ public IHttpClientFactory ? HttpClientFactory { get ; init ; }
10
10
}
You can’t perform that action at this time.
0 commit comments