XFEExtension.NetCore.AutoImplement 1.1.0

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

XFEExtension.NetCore.AutoImplement

描述

自动生成实现类

自动生成实现类

[CreateImpl]
abstract class TestAbstractClass(int num)
{
    public int Num { get; set; } = num;
}

class Program
{
    static void Main(string[] args)
    {
        var testAbstractClass = new TestAbstractClassImpl(123);
        Console.WriteLine(testAbstractClass.Num);
    }
}
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.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 89 9/5/2025
1.0.1 151 9/26/2024
1.0.0 123 6/4/2024

现在,可以通过在CreateImpl特性的传参中设置属性来实现自定义实现类的类名、命名空间及可访问性修饰符
     且现在的实现类默认使用`internal`和`partial`修饰符,可以更加方便的修改实现类中的内容