Class SaveSystem

Namespace
CodeSmile.AnyMotion.Core.SaveLoad
/
Assembly
ApiSource.dll

Default ISaveSystem. Wraps expected I/O and format failures into a Result rather than throwing, so callers never need a try/catch around Save or Load. Exceptions outside that expected set — eg a bug in a custom ITextSerializer — still propagate, because those are programming errors, not the external-input failures this exists to handle.

public sealed class SaveSystem : ISaveSystem
Expand Details ...
Inheritance
object
SaveSystem
Implements

Constructors

SaveSystem(ITextSerializer, IFileIO)

public SaveSystem(ITextSerializer serializer, IFileIO fileIO)

Parameters

Type Name Description
ITextSerializer
serializer
IFileIO
fileIO

Methods

Load<T>(string)

public LoadResult<T> Load<T>(string filePath) where T : new()

Parameters

Type Name Description
string
filePath

Returns

LoadResult<T>

Type Parameters

T

Save<T>(T, string)

public SaveResult Save<T>(T data, string filePath)

Parameters

Type Name Description
T
data
string
filePath

Returns

SaveResult

Type Parameters

T