private BoxHomeDefaultSettings SetBoxReportsFolderPathIfNull(BoxHomeDefaultSettings settings) { if (string.IsNullOrEmpty(settings.BoxReportsFolderPath)) { var path = $"{_boxHome.GetBaseDirectoryPath()}{Path.DirectorySeparatorChar}Documents{Path.DirectorySeparatorChar}{settings.BoxReportsFolderName}"; settings.BoxReportsFolderPath = path; } return(settings); }
private void SerializeBoxHomeSettingsFile(BoxHomeDefaultSettings settings) { var path = GetBoxHomeSettingsFilePath(); var serializer = new JsonSerializer(); using (StreamWriter file = File.CreateText(path)) { serializer.Serialize(file, settings); } }