MakeInterface.Generator
0.3.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MakeInterface.Generator --version 0.3.0
NuGet\Install-Package MakeInterface.Generator -Version 0.3.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="MakeInterface.Generator" Version="0.3.0"> <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.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MakeInterface.Generator, 0.3.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.
// Install MakeInterface.Generator as a Cake Addin #addin nuget:?package=MakeInterface.Generator&version=0.3.0 // Install MakeInterface.Generator as a Cake Tool #tool nuget:?package=MakeInterface.Generator&version=0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MakeInterface
Creates an interface of a class using source generator
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 |