Change WindowsSettings class to record and use with to create translated setting

This commit is contained in:
Kevin Zhang 2021-10-29 23:08:59 -05:00
parent ae2e72b926
commit 7cfb71df35
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ namespace Flow.Plugin.WindowsSettings.Classes
/// <summary> /// <summary>
/// A windows setting /// A windows setting
/// </summary> /// </summary>
internal class WindowsSetting internal record WindowsSetting
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="WindowsSetting"/> class. /// Initializes a new instance of the <see cref="WindowsSetting"/> class.

View file

@ -80,7 +80,7 @@ namespace Flow.Plugin.WindowsSettings.Helper
} }
} }
var translatedSetting = new WindowsSetting var translatedSetting = settings with
{ {
Area = area ?? settings.Area, Area = area ?? settings.Area,
Name = name ?? settings.Name, Name = name ?? settings.Name,