mirror of
https://github.com/ppy/osu
synced 2024-12-29 02:12:43 +00:00
Add xmldoc and make realm ongoing transaction file op methods protected
instead of public
This commit is contained in:
parent
8ce7467e97
commit
ea66cd6c5e
@ -57,17 +57,26 @@ namespace osu.Game.Stores
|
||||
public void AddFile(TModel item, Stream stream, string filename)
|
||||
=> item.Realm.Write(() => AddFile(item, stream, filename, item.Realm));
|
||||
|
||||
public void DeleteFile(TModel item, RealmNamedFileUsage file, Realm realm)
|
||||
/// <summary>
|
||||
/// Delete a file from within an ongoing realm transaction.
|
||||
/// </summary>
|
||||
protected void DeleteFile(TModel item, RealmNamedFileUsage file, Realm realm)
|
||||
{
|
||||
item.Files.Remove(file);
|
||||
}
|
||||
|
||||
public void ReplaceFile(TModel model, RealmNamedFileUsage file, Stream contents, Realm realm)
|
||||
/// <summary>
|
||||
/// Replace a file from within an ongoing realm transaction.
|
||||
/// </summary>
|
||||
protected void ReplaceFile(TModel model, RealmNamedFileUsage file, Stream contents, Realm realm)
|
||||
{
|
||||
file.File = realmFileStore.Add(contents, realm);
|
||||
}
|
||||
|
||||
public void AddFile(TModel item, Stream stream, string filename, Realm realm)
|
||||
/// <summary>
|
||||
/// Add a file from within an ongoing realm transaction.
|
||||
/// </summary>
|
||||
protected void AddFile(TModel item, Stream stream, string filename, Realm realm)
|
||||
{
|
||||
var file = realmFileStore.Add(stream, realm);
|
||||
var namedUsage = new RealmNamedFileUsage(file, filename);
|
||||
|
Loading…
Reference in New Issue
Block a user