-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab8e5c9
commit d19b0fd
Showing
87 changed files
with
2,549 additions
and
2,704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Enums; | ||
|
||
namespace MinecraftLaunch.Classes.Enums { | ||
public enum AccountType { | ||
/// <summary> | ||
/// 离线账户 | ||
/// </summary> | ||
Offline, | ||
public enum AccountType { | ||
/// <summary> | ||
/// 离线账户 | ||
/// </summary> | ||
Offline, | ||
|
||
/// <summary> | ||
/// 微软账户 | ||
/// </summary> | ||
Microsoft, | ||
/// <summary> | ||
/// 微软账户 | ||
/// </summary> | ||
Microsoft, | ||
|
||
/// <summary> | ||
/// Yggdrasil 第三方账户 | ||
/// </summary> | ||
Yggdrasil, | ||
/// <summary> | ||
/// Yggdrasil 第三方账户 | ||
/// </summary> | ||
Yggdrasil, | ||
|
||
/// <summary> | ||
/// UnifiedPass 统一通行证 | ||
/// </summary> | ||
UnifiedPass | ||
} | ||
} | ||
/// <summary> | ||
/// UnifiedPass 统一通行证 | ||
/// </summary> | ||
UnifiedPass | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Enums; | ||
|
||
namespace MinecraftLaunch.Classes.Enums { | ||
public enum DownloadEntryType { | ||
Jar, | ||
Asset, | ||
Library | ||
} | ||
} | ||
public enum DownloadEntryType { | ||
Jar, | ||
Asset, | ||
Library | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Enums; | ||
|
||
namespace MinecraftLaunch.Classes.Enums { | ||
public enum LoaderType { | ||
Forge, | ||
Quilt, | ||
Fabric, | ||
Vanilla, | ||
OptiFine, | ||
LiteLoader, | ||
} | ||
} | ||
public enum LoaderType { | ||
Forge, | ||
Quilt, | ||
Fabric, | ||
Vanilla, | ||
OptiFine, | ||
LiteLoader, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Enums; | ||
|
||
namespace MinecraftLaunch.Classes.Enums | ||
{ | ||
public enum Platform | ||
{ | ||
windows, | ||
linux, | ||
osx, | ||
unknown | ||
} | ||
} | ||
public enum Platform { | ||
windows, | ||
linux, | ||
osx, | ||
unknown | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
namespace MinecraftLaunch.Classes.Interfaces { | ||
/// <summary> | ||
/// 验证器统一接口(IoC 适应) | ||
/// </summary> | ||
public interface IAuthenticator<out TAccount> { | ||
TAccount Authenticate(); | ||
} | ||
} | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
/// <summary> | ||
/// 验证器统一接口(IoC 适应) | ||
/// </summary> | ||
public interface IAuthenticator<out TAccount> { | ||
TAccount Authenticate(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
/// <summary> | ||
/// 检查器统一接口 | ||
/// </summary> | ||
public interface IChecker { | ||
ValueTask<bool> CheckAsync(); | ||
} | ||
} | ||
/// <summary> | ||
/// 检查器统一接口 | ||
/// </summary> | ||
public interface IChecker { | ||
ValueTask<bool> CheckAsync(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
using MinecraftLaunch.Classes.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public interface IDownloadEntry { | ||
int Size { get; set; } | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
string Url { get; set; } | ||
public interface IDownloadEntry { | ||
int Size { get; set; } | ||
|
||
string Path { get; set; } | ||
string Url { get; set; } | ||
|
||
string Checksum { get; set; } | ||
string Path { get; set; } | ||
|
||
DownloadEntryType Type { get; } | ||
} | ||
} | ||
string Checksum { get; set; } | ||
|
||
DownloadEntryType Type { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public interface IDownloader { | ||
ValueTask<bool> DownloadAsync(); | ||
} | ||
} | ||
public interface IDownloader { | ||
ValueTask<bool> DownloadAsync(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
namespace MinecraftLaunch.Classes.Interfaces { | ||
/// <summary> | ||
/// 统一搜寻器接口 | ||
/// </summary> | ||
public interface IFetcher<T> { | ||
public T Fetch(); | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
public ValueTask<T> FetchAsync(); | ||
} | ||
} | ||
/// <summary> | ||
/// 统一搜寻器接口 | ||
/// </summary> | ||
public interface IFetcher<T> { | ||
public T Fetch(); | ||
|
||
public ValueTask<T> FetchAsync(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
using System.Diagnostics; | ||
using MinecraftLaunch.Classes.Models.Event; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public class IGameProcessWatcher { | ||
public Process Process { get; } | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
public IEnumerable<string> Arguments { get; } | ||
public class IGameProcessWatcher { | ||
public Process Process { get; } | ||
|
||
public event EventHandler<ExitedEventArgs> Exited; | ||
public IEnumerable<string> Arguments { get; } | ||
|
||
public event EventHandler<LogReceivedEventArgs> OutputLogReceived; | ||
} | ||
} | ||
public event EventHandler<ExitedEventArgs> Exited; | ||
|
||
public event EventHandler<LogReceivedEventArgs> OutputLogReceived; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
using MinecraftLaunch.Classes.Models.Game; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public interface IGameResolver { | ||
DirectoryInfo Root { get; } | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
GameEntry GetGameEntity(string id); | ||
public interface IGameResolver { | ||
DirectoryInfo Root { get; } | ||
|
||
IEnumerable<GameEntry> GetGameEntitys(); | ||
} | ||
} | ||
GameEntry GetGameEntity(string id); | ||
|
||
IEnumerable<GameEntry> GetGameEntitys(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
using MinecraftLaunch.Classes.Models.Event; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public interface IInstaller { | ||
ValueTask<bool> InstallAsync(); | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
void ReportProgress(double progress, string progressStatus, TaskStatus status); | ||
public interface IInstaller { | ||
ValueTask<bool> InstallAsync(); | ||
|
||
event EventHandler<EventArgs> Completed; | ||
void ReportProgress(double progress, string progressStatus, TaskStatus status); | ||
|
||
event EventHandler<ProgressChangedEventArgs> ProgressChanged; | ||
} | ||
} | ||
event EventHandler<EventArgs> Completed; | ||
|
||
event EventHandler<ProgressChangedEventArgs> ProgressChanged; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
using MinecraftLaunch.Classes.Models.Launch; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
/// <summary> | ||
/// 启动器统一接口(IoC适应) | ||
/// </summary> | ||
public interface ILauncher { | ||
LaunchConfig LaunchConfig { get; } | ||
|
||
IGameResolver GameResolver { get; } | ||
|
||
ValueTask<IGameProcessWatcher> LaunchAsync(string id); | ||
} | ||
} | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
/// <summary> | ||
/// 启动器统一接口(IoC适应) | ||
/// </summary> | ||
public interface ILauncher { | ||
LaunchConfig LaunchConfig { get; } | ||
|
||
IGameResolver GameResolver { get; } | ||
|
||
ValueTask<IGameProcessWatcher> LaunchAsync(string id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
namespace MinecraftLaunch.Classes.Interfaces; | ||
|
||
namespace MinecraftLaunch.Classes.Interfaces { | ||
public interface IResolver {} | ||
public interface IResolver {} | ||
|
||
public interface IResolver<T> : IResolver { | ||
T Resolve(string str); | ||
} | ||
|
||
public interface IResolver<TReturn, TParameter> : IResolver { | ||
TReturn Resolve(TParameter parameter); | ||
} | ||
public interface IResolver<T> : IResolver { | ||
T Resolve(string str); | ||
} | ||
|
||
public interface IResolver<TReturn, TParameter> : IResolver { | ||
TReturn Resolve(TParameter parameter); | ||
} |
Oops, something went wrong.