Pixeval.Extensions.Common 4.3.11

dotnet add package Pixeval.Extensions.Common --version 4.3.11
                    
NuGet\Install-Package Pixeval.Extensions.Common -Version 4.3.11
                    
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="Pixeval.Extensions.Common" Version="4.3.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pixeval.Extensions.Common" Version="4.3.11" />
                    
Directory.Packages.props
<PackageReference Include="Pixeval.Extensions.Common" />
                    
Project file
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 Pixeval.Extensions.Common --version 4.3.11
                    
#r "nuget: Pixeval.Extensions.Common, 4.3.11"
                    
#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.
#addin nuget:?package=Pixeval.Extensions.Common&version=4.3.11
                    
Install Pixeval.Extensions.Common as a Cake Addin
#tool nuget:?package=Pixeval.Extensions.Common&version=4.3.11
                    
Install Pixeval.Extensions.Common as a Cake Tool

Pixeval.Extensions

本项目是Pixeval扩展功能的工具项目,被主项目(下称Pixeval)高强度依赖,所以本项目会和Pixeval同步迭代(使用相同的版本号)。

本项目通过NuGet进行分发,在NuGet上有两个包:

  • Pixeval.Extensions.Common:这个包声明了Pixeval与扩展进行通信使用的接口,和一些简单的工具类。这个包会被Pixeval和下面的SDK包引用。
  • Pixeval.Extensions.SDK:这个包对上一个包的接口进行了封装,降低了编写扩展的难度和工作量。扩展的开发者应该引用这个包。

关于向后兼容

本项目正处于早期开发阶段,不能保证向后兼容,但遇到相关问题欢迎与商讨( •̀ ω •́ )✧。

C#/.NET的extension类型对本项目帮助很大,在extension功能发布后势必要对本项目进行全方位的优化,但也会尽量保持向前兼容。

关于扩展系统使用的技术

为了方便以后将Pixeval改写为AOT项目,Pixeval的扩展系统要求加载的扩展也是AOT的,所以扩展系统选择了COM + P/Invoke的技术实现。

.NET在8.0版本才实现了完全支持AOT的COM技术,所以本项目最低支持的.NET SDK是.NET 8。

由于AOT和COM系统的局限性,项目中几乎不能使用反射技术,通信时也不能使用复杂的类型(只有接口和方法,这也是为什么需要SDK项目),但好在除此之外的其他技术并没有多少限制。

理论上来说本扩展系统可以加载任何不需要运行时的扩展文件(尤其是C++),但我目前还没有为其他语言写工具库,所以实际用除C#之外的语言开发可能会遇到很多困难。

扩展案例

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Pixeval.Extensions.Common:

Package Downloads
Pixeval.Extensions.SDK

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Pixeval.Extensions.Common:

Repository Stars
Pixeval/Pixeval
Wow. Yet another Pixiv client!
Version Downloads Last updated
4.3.11 202 3/29/2025
4.3.9 207 3/10/2025
4.3.9-dev-4 176 3/9/2025
4.3.9-dev-3 97 2/27/2025
4.3.9-dev-2 109 2/27/2025
4.3.9-dev-1 584 2/22/2025
4.3.6 227 2/13/2025
4.3.5-dev-2 113 2/12/2025
4.3.5-dev-1 136 2/2/2025
4.3.4 225 1/13/2025
4.3.3 138 1/5/2025