sourcegit/src/Models/CommitTemplate.cs
Nathan Baulch ffac71b15f
code_style: general cleanup (#1415)
* code_style:  general cleanup

* code_style: whitespace cleanup
2025-06-12 09:35:37 +08:00

30 lines
711 B
C#

using System.Collections.Generic;
using CommunityToolkit.Mvvm.ComponentModel;
namespace SourceGit.Models
{
public class CommitTemplate : ObservableObject
{
public string Name
{
get => _name;
set => SetProperty(ref _name, value);
}
public string Content
{
get => _content;
set => SetProperty(ref _content, value);
}
public string Apply(Branch branch, List<Change> changes)
{
var te = new TemplateEngine();
return te.Eval(_content, branch, changes);
}
private string _name = string.Empty;
private string _content = string.Empty;
}
}