Show / Hide Table of Contents

Class StorageExtensions

Inheritance
System.Object
StorageExtensions
Namespace: Eco.Core.Serialization
Assembly: Eco.Core.dll
Syntax
public static class StorageExtensions : Object

Methods

Modify<T>(T, Action<T>)

Perform storage modification. It ensures it won't be modified or saved in another thread to prevent concurrency issues.

Declaration
public static void Modify<T>(this T storage, Action<T> action)
    where T : IStorage
Parameters
Type Name Description
T storage
System.Action<T> action
Type Parameters
Name Description
T

Modify<T, TResult>(T, Func<T, TResult>)

Perform storage modification (version with return value). It ensures it won't be modified or saved in another thread to prevent concurrency issues.

Declaration
public static TResult Modify<T, TResult>(this T storage, Func<T, TResult> action)
    where T : IStorage
Parameters
Type Name Description
T storage
System.Func<T, TResult> action
Returns
Type Description
TResult
Type Parameters
Name Description
T
TResult

SaveAll(IStorage)

Declaration
public static void SaveAll(this IStorage storage)
Parameters
Type Name Description
IStorage storage
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾