MirrorChyan.Net
1.0.1
dotnet add package MirrorChyan.Net --version 1.0.1
NuGet\Install-Package MirrorChyan.Net -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MirrorChyan.Net" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MirrorChyan.Net" Version="1.0.1" />
<PackageReference Include="MirrorChyan.Net" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MirrorChyan.Net --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MirrorChyan.Net, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MirrorChyan.Net@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MirrorChyan.Net&version=1.0.1
#tool nuget:?package=MirrorChyan.Net&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MirrorCHyan.Net
Mirror 酱 的 .Net Api 封装。
Getting Started
这个库在 Nuget 上发布,可以通过以下命令安装:
dotnet add package MirrorChyan.Net
使用依赖注入
using MirrorChyan.Net;
using MirrorChyan.Net.Models;
using MirrorChyan.Net.Services;
// 注册服务
services.AddMirrorChyan(productId: "abb", clientName: "AbbTauriGui", currentVersion: "v1.0.0");
var provider = services.BuildServiceProvider();
// 使用服务
var service = provider.GetRequiredService<IMirrorChyanService>();
// 当没有提供 CDK 时只能进行版本查询,得到的 `VersionModel.Artifact` 为空,不可进一步下载安装
var version = await service.GetLatestVersionAsync(cdk: null, ChannelKind.Stable);
直接使用裸接口
using MirrorChyan.Net;
using MirrorChyan.Net.Models;
using MirrorChyan.Net.Services;
// 创建服务
var service = IMirrorChyanService.Create(new Uri("https://mirrorchyan.com"), new MirrorChyanOptions
{
ProductId = "maa",
ClientName = "MaaWpfGui",
VersionString = "v1.0.0"
});
// 使用客户端
var version = await service.GetLatestVersionAsync(cdk: null, ChannelKind.Stable);
Deep Dive
没有深入。Mirror酱只提供了一个接口,所以这个库也只封装了一个接口。如果需要进一步的用法例如打包与安装,请使用扩展库。
Extensions
- Velopack 更新扩展: VelopackExtension.MirrorChyan
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Refit (>= 9.0.2)
- Refit.HttpClientFactory (>= 9.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MirrorChyan.Net:
| Package | Downloads |
|---|---|
|
VelopackExtension.MirrorChyan
Unofficial extension for Velopack to support MirrorChyan. |
GitHub repositories
This package is not used by any popular GitHub repositories.