Use the new field keyword where appropriate.

This commit is contained in:
Michael Bucari-Tovo
2025-11-21 11:50:07 -07:00
parent 649ef5f864
commit dfbc5ec9db
37 changed files with 162 additions and 283 deletions

View File

@@ -86,11 +86,10 @@ namespace LibationFileManager.Templates
=> NamingTemplate?.TagsInUse.Cast<TemplateTags>() ?? Enumerable.Empty<TemplateTags>();
public string TemplateText => NamingTemplate?.TemplateText ?? "";
private readonly NamingTemplate? _namingTemplate;
protected NamingTemplate NamingTemplate
{
get => _namingTemplate ?? throw new NullReferenceException(nameof(_namingTemplate));
private init => _namingTemplate = value;
get => field ?? throw new NullReferenceException(nameof(NamingTemplate));
private init => field = value;
}
#endregion