public void Load() { if (_storage.TryRead(StorageKey, out AlexOptions options)) { AlexOptions = options; } }
public void Load() { if (_storage.TryRead(StorageKey, out AlexOptions options)) { AlexOptions = options; } else { Log.Warn($"Could not read from storage."); } }
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!"); } } }
public void Load() { if (_storage.TryRead(StorageKey, out SavedServerEntry[] newEntries))