Skip to content

yscorecore/flytiger

Repository files navigation

FlyTiger

FlyTiger is a dotnet source generator class library. It provide several useful features to make coding on c# more easier.

build codecov Nuget GitHub Sonar

How it works

FlyTiger use Source Generator to emit C# source code during compilation. It generate both feature code and attribute class code to output assembly, so the target assembly doesn't depend on the FlyTiger assembly in runtime.

Features

  • AutoConstructor (Automatically generate constructor for class)
  • ConvertTo (The highest performance model-class conversion solution, supporting EFCore)
  • SingletonPattern (The easiest way to define the singleton pattern)
  • AutoNotify (Automatically generate PropertyChanged events)

How to use

  1. Add FlyTiger package in your csharp project.

    dotnet add package FlyTiger 

    Or you can edit the csproj, add FlyTiger to your project.

    <ItemGroup>
        <PackageReference Include="FlyTiger" Version="0.0.4" />
    </ItemGroup>
  2. Use attribute class

    using FlyTiger;
    namespace ClassLibrary1
    {
        [AutoConstructor]
        public partial class User
        {
            private readonly string name;
            private readonly string age;
        }
    }

    More usage please goto the FlyTiger Documentation.

Maintainers

@Pengbo Yang

Contributing

Feel free to dive in! Open an issue or submit PRs.

Standard Readme follows the Contributor Covenant Code of Conduct.

Contributors

This project exists thanks to all the people who contribute.

License

MIT © Pengbo Yang