Namespace: Astra · Assembly: Astra.Scripting · Tipo: Class
One project-owned save namespace. Changes to keys commit with Flush; standalone files commit immediately. Errors never select a temporary directory.
Interfaces: System.IDisposable.
MaxFileBytes
public const int MaxFileBytes = 1048576
MaxFilesBytes
public const long MaxFilesBytes = 16777216
MaxSnapshotBytes
public const int MaxSnapshotBytes = 262144
.ctor
public SaveStore(string projectRoot)
| Parâmetro |
Tipo |
Contrato |
projectRoot |
string |
|
Contains
public bool Contains(string key)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
Delete
public bool Delete(string key)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
DeleteFile
public bool DeleteFile(string safeRelativePath)
| Parâmetro |
Tipo |
Contrato |
safeRelativePath |
string |
|
Dispose
Flush
GetBoolean
public bool GetBoolean(string key, bool fallback = false)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
fallback |
bool |
· Opcional: False |
GetDouble
public double GetDouble(string key, double fallback = 0)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
fallback |
double |
· Opcional: 0 |
GetInt64
public long GetInt64(string key, long fallback = 0)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
fallback |
long |
· Opcional: 0 |
GetString
public string GetString(string key, string fallback = "")
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
fallback |
string |
· Opcional: `` |
ReadBytes
public byte[] ReadBytes(string safeRelativePath)
| Parâmetro |
Tipo |
Contrato |
safeRelativePath |
string |
|
ReadText
public string ReadText(string safeRelativePath)
| Parâmetro |
Tipo |
Contrato |
safeRelativePath |
string |
|
SetBoolean
public void SetBoolean(string key, bool value)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
value |
bool |
|
SetDouble
public void SetDouble(string key, double value)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
value |
double |
|
SetInt64
public void SetInt64(string key, long value)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
value |
long |
|
SetString
public void SetString(string key, string value)
| Parâmetro |
Tipo |
Contrato |
key |
string |
|
value |
string |
|
WriteBytes
public void WriteBytes(string safeRelativePath, System.ReadOnlySpan<byte> bytes)
| Parâmetro |
Tipo |
Contrato |
safeRelativePath |
string |
|
bytes |
System.ReadOnlySpan<byte> |
|
WriteText
public void WriteText(string safeRelativePath, string text)
| Parâmetro |
Tipo |
Contrato |
safeRelativePath |
string |
|
text |
string |
|
Recovery
public Astra.SaveRecovery Recovery { get; private set; }