jtr/Jtr.Tools/Json2CSharpTranslator.PropertyTranslation.cs
mdnapo 96c203f842
All checks were successful
Run the JSON parser tests / test (push) Has been skipped
Moved UI to separate project, added Dockerfile & renamed project
2024-10-19 12:04:40 +02:00

17 lines
431 B
C#

using Humanizer;
namespace Jtr.Tools;
public static partial class Json2CSharpTranslator
{
public readonly struct PropertyTranslation : ITranslation
{
public string Name { get; init; }
public string Type { get; init; }
public void Translate(Context context)
{
context.Builder.Append($"\tpublic {Type} {Name.Pascalize()} {{ get; set; }}\n");
}
}
}