Basilisque.AutoImplementer.CodeAnalysis.Fasteroid 1.1.0-F

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

// Install Basilisque.AutoImplementer.CodeAnalysis.Fasteroid as a Cake Tool
#tool nuget:?package=Basilisque.AutoImplementer.CodeAnalysis.Fasteroid&version=1.1.0-F&prerelease                

Basilisque - Auto Implementer

Overview

This project provides functionality to automatically implement interfaces.

NuGet Basilisque.AutoImplementer.CodeAnalysis License

Description

This project contains a source generator that automatically implements interface members in classes implementing the interfaces.
The goal is to provide a workaround for C# not supporting multiple inheritance for some basic use cases.

Getting Started

Install the NuGet package Basilisque.AutoImplementer.
Installing the package will add the source generator to your project.

Now you're ready to start implementing your interfaces automatically.

Features

  • Properties of interfaces will be added as auto-implemented properties

Examples

Create the interfaces:

[AutoImplementable()]
public interface ITitle
{
  [Required] string Title { get; set; } // implements 'Title' as 'required' in .NET 7.0+
}

[AutoImplementable()]
public interface IDetails
{
  byte[]? Image { get; set; }
  string Summary { get; set; }
}

Create some classes implementing the interfaces:

public partial class Book : ITitle, IDetails
{ /* will have the properties Title, Image and Summary */ }

public partial class Movie : ITitle, IDetails
{ /* will have the properties Title, Image and Summary */ }

public partial class Song: ITitle
{ /* will have the property Title */ }

The source generator now adds the members to the corresponding classes without you having to do this on your own every time.

For details see the wiki.

License

The Basilisque framework (including this repository) is licensed under the Apache License, Version 2.0.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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-F 42 12/5/2024