BeGenerate 0.1.2

dotnet add package BeGenerate --version 0.1.2                
NuGet\Install-Package BeGenerate -Version 0.1.2                
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="BeGenerate" Version="0.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BeGenerate --version 0.1.2                
#r "nuget: BeGenerate, 0.1.2"                
#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.
// Install BeGenerate as a Cake Addin
#addin nuget:?package=BeGenerate&version=0.1.2

// Install BeGenerate as a Cake Tool
#tool nuget:?package=BeGenerate&version=0.1.2                

BeGenerate

GitHub License GitHub Actions Workflow Status NuGet Version

This repo is the home for BeGenerate, a .NET Code Generator that simplifies the process of creating boilerplate code. The current feature set is still limited as we're at a pre-release stage, but we're working hard to add more features and improve the existing ones.

Usage

Add the BeGenerate package to your project:

dotnet add package BeGenerate

This will add the BeGenerate code generator to your project, and will add the required abstractions to your project.

AutoInterface

The AutoInterface feature allows you to automatically generate interfaces for your classes. This is useful when you have a class that you want to extract an interface from, but you don't want to do it manually.

To use the AutoInterface feature, you need to add the AutoInterface attribute to your class:

using BeGenerate.AutoInterface;

[AutoInterface]
internal sealed class MyService : IMyService
{
    public void MyMethod()
    {
        // Do something
    }
}

When you build your project, the code generator will automatically generate an interface for your class:

public interface IMyService
{
    void MyMethod();
}

You can leave out methods and properties by adding the ExcludeFromInterface attribute to them:

using BeGenerate.AutoInterface;

[AutoInterface]
internal sealed class MyService : IMyService
{
    public void MyMethod()
    {
        // Do something
    }
    
    [ExcludeFromInterface]
    public void MyMethodToExclude()
    {
        // Do something
    }
}

Contributing

BeGenerate is a community project. We invite your participation through issues and pull requests!

License

All assets and code are under the MIT LICENSE and in the public domain unless specified otherwise.

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.
  • 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
0.1.2 44 2/15/2025
0.1.2-ci0001 37 2/15/2025
0.1.1 32 2/15/2025
0.1.1-ci0002 33 2/15/2025
0.1.0 42 2/15/2025
0.1.0-ci0004 36 2/15/2025
0.1.0-ci0003 36 2/15/2025
0.1.0-ci0002 42 2/15/2025
0.1.0-ci0001 42 2/4/2025