Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        private void SerializeBoxHomeSettingsFile(BoxHomeDefaultSettings settings)
        {
            var path       = GetBoxHomeSettingsFilePath();
            var serializer = new JsonSerializer();

            using (StreamWriter file = File.CreateText(path))
            {
                serializer.Serialize(file, settings);
            }
        }