示例#1
0
 public void Load()
 {
     if (_storage.TryRead(StorageKey, out AlexOptions options))
     {
         AlexOptions = options;
     }
 }
示例#2
0
 public void Load()
 {
     if (_storage.TryRead(StorageKey, out AlexOptions options))
     {
         AlexOptions = options;
     }
     else
     {
         Log.Warn($"Could not read from storage.");
     }
 }
示例#3
0
 public void Load()
 {
     if (!_storage.TryRead <AlexOptions>(StorageKey, out var options))
     {
         // no options file?
         options = new AlexOptions();
         if (!_storage.TryWrite <AlexOptions>(StorageKey, options))
         {
             // uhmmm...
             throw new IOException("Unable to write default AlexOptions!");
         }
     }
 }
示例#4
0
 public void Load()
 {
     if (_storage.TryRead(StorageKey, out SavedServerEntry[] newEntries))