DatabaseSettingsFile
A class in Root.Township, Alta.Utilities.
A settings "file" stored through the Alta web API's settings endpoint instead of on disk. Most file operations do nothing.
- Listed in Utilities and other Alta namespaces
- Inherits or implements
IAltaFile
Constructors
| Member | What it is |
|---|---|
DatabaseSettingsFile(string name) | Creates a DatabaseSettingsFile from name. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
IAltaFileFormat Content { get; set; } | The last content read or to be written. |
string FullName { get; } | Same as Name, the settings key. |
bool HasChanged { get; } | Always true. |
bool IsExisting { get; } | Always true. |
bool IsReading { get; private set; } | Meant to show a read is running. It's cleared as soon as the read starts, so it's rarely true. |
bool IsWriting { get; private set; } | True while a write is running. |
string Name { get; } | The settings key used with the API. |
Methods
| Member | What it is |
|---|---|
void Delete(bool isDeletingBackup = false) | Does nothing. |
Task DeleteAsync(bool isDeletingBackup = false) | Does nothing. |
void FinishReading() | Blocks until a running read finishes. |
void FinishWriting() | Blocks until a running write finishes. |
void MoveTo(IAltaFolder folder) | Does nothing. |
void QueueUnload() | Does nothing. |
Task QueueUnloadAsync() | Does nothing. |
Task<T> ReadAsync<T>() | Fetches the settings text from the API and reads it into a new content object. Empty text leaves it at defaults. |
async Task<T> ReadAsync<T>(Func<T> create) | Fetches the settings text from the API and reads it into a new content object. Empty text leaves it at defaults. |
void Refresh() | Does nothing. |
void ResetHasChanged() | Does nothing. |
async void WriteAsync() | Writes Content to text and sends it to the API, waiting for any earlier write first. |