MakeInterface.Generator 0.4.1

dotnet add package MakeInterface.Generator --version 0.4.1
                    
NuGet\Install-Package MakeInterface.Generator -Version 0.4.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="MakeInterface.Generator" Version="0.4.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MakeInterface.Generator" Version="0.4.1" />
                    
Directory.Packages.props
<PackageReference Include="MakeInterface.Generator">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 MakeInterface.Generator --version 0.4.1
                    
#r "nuget: MakeInterface.Generator, 0.4.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.
#addin nuget:?package=MakeInterface.Generator&version=0.4.1
                    
Install MakeInterface.Generator as a Cake Addin
#tool nuget:?package=MakeInterface.Generator&version=0.4.1
                    
Install MakeInterface.Generator as a Cake Tool

MakeInterface

Creates an interface of a class using source generator

.NET

Usage

Add the attribute to the class you want to generate the interface for

[GenerateInterface]
public class MyClass
{
	public string MyProperty { get; set; }
	public void MyMethod() { }
}

The generated interface will then be generated as IMyClass.g.cs

public interface IMyClass
{
	string MyProperty { get; set; }
	void MyMethod();
}

You can then implement the interface in your class

public class MyClass : IMyClass
{
	public string MyProperty { get; set; }
	public void MyMethod() { }
}

Installation

Install the NuGet package MakeInterface

You can either create the attribute yourself or use the one provided in the package MakeInterface.Contracts

License

MIT

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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.4.1 349 1/25/2024
0.4.0 210 1/17/2024
0.3.3 478 12/23/2022
0.3.2 309 12/22/2022
0.3.1 346 12/22/2022
0.3.0 316 12/21/2022
0.2.3 315 12/21/2022
0.2.2 317 12/21/2022
0.2.1 302 12/21/2022
0.2.0 314 12/19/2022
0.1.2 324 12/19/2022
0.1.1 337 12/19/2022
0.1.0 316 12/18/2022
0.0.3 358 12/16/2022
0.0.2 329 12/16/2022
0.0.1 319 12/16/2022