MakeInterface.Generator 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package MakeInterface.Generator --version 0.0.2                
NuGet\Install-Package MakeInterface.Generator -Version 0.0.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="MakeInterface.Generator" Version="0.0.2">
  <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.
paket add MakeInterface.Generator --version 0.0.2                
#r "nuget: MakeInterface.Generator, 0.0.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 MakeInterface.Generator as a Cake Addin
#addin nuget:?package=MakeInterface.Generator&version=0.0.2

// Install MakeInterface.Generator as a Cake Tool
#tool nuget:?package=MakeInterface.Generator&version=0.0.2                

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 268 1/25/2024
0.4.0 200 1/17/2024
0.3.3 450 12/23/2022
0.3.2 292 12/22/2022
0.3.1 322 12/22/2022
0.3.0 300 12/21/2022
0.2.3 298 12/21/2022
0.2.2 302 12/21/2022
0.2.1 286 12/21/2022
0.2.0 298 12/19/2022
0.1.2 309 12/19/2022
0.1.1 317 12/19/2022
0.1.0 301 12/18/2022
0.0.3 340 12/16/2022
0.0.2 311 12/16/2022
0.0.1 303 12/16/2022