コード例 #1
0
 public PersistentSettings(bool global)
 {
     if (global)
     {
         FileSystemHelpers.EnsureDirectory(Path.GetDirectoryName(PersistentSettingsPath));
         store = DiskBacked.Create <Dictionary <string, object> >(PersistentSettingsPath);
     }
     else
     {
         store = DiskBacked.Create <Dictionary <string, object> >(Path.Combine(Environment.CurrentDirectory, ".config"));
     }
 }
コード例 #2
0
 public static DiskBacked <T> Create <T>(string path) where T : new()
 {
     return(DiskBacked <T> .Create(path));
 }
コード例 #3
0
 public static DiskBacked <T> CreateEncrypted <T>(string path, string encryptionReason = null) where T : new()
 {
     return(DiskBacked <T> .CreateEncrypted(path, encryptionReason));
 }