Info
Version: | 2022.5.20.2101 |
Author(s): | Andrei Ignat |
Last Update: | Saturday, May 21, 2022 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/ignatandrei/AOP_With_Roslyn/tree/master/AOPMethods |
NuGet Url: | https://www.nuget.org/packages/AOPMethodsGenerator |
Install
Install-Package AOPMethodsGenerator
dotnet add package AOPMethodsGenerator
paket add AOPMethodsGenerator
AOPMethodsGenerator Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.CodeAnalysis.CSharp(>= 3.8.0)
- Scriban(>= 3.0.2)
- ThisAssembly.AssemblyInfo(>= 1.0.0)
- ThisAssembly.Project(>= 1.0.0)
Tags
Autogenerates public methods from a class .
( replace below single quotes with double quotes)
[AutoMethods(template = TemplateMethod.CallerAtttributes, MethodPrefix ='pub', MethodSuffix ='bup')]
partial class Person
{
public string LastName { get; set; }
public string FirstName { get; set; }
private string pubFullName()
{
return FirstName + ' ' + LastName;
}
private void pubWriteToConsoleFullName()
{
Console.WriteLine(this.FullName());
}
}
// it will generate for this class the public methods
public string FullName
public string WriteToConsoleFullName
Add also Nuget package AOPMethodsCommon
You can have your own template - read the readme.txt.