Class
FileHandler<T>

not thread safe, due to using serializer as a member

Definition

Namespace:ArtOfTest.Common.Design

Assembly:ArtOfTest.WebAii.Design.dll

Type Parameters:

T

Syntax:

cs-api-definition
public class FileHandler<T> : FileHandlerBase<T>

Inheritance: objectFileHandlerBase<T>FileHandler<T>

Constructors

FileHandler()

Declaration

cs-api-definition
public FileHandler()

Methods

Export(string, Dictionary<T, string>)

Declaration

cs-api-definition
public string Export(string filePath, Dictionary<T, string> objectsWithPaths)

Parameters

filePath

string

objectsWithPaths

Dictionary<T, string>

Returns

string

LoadFromDisk(string)

Loads and deserialize object from the file system. This will NOT trigger assembly indexing

Declaration

cs-api-definition
public T LoadFromDisk(string pathToFile)

Parameters

pathToFile

string

Returns

T

LoadFromDisk(string, bool)

Loads and deserialize object from the file system. If the 'autoLoadTypes' is set to true all the AppDomain assemblies will be indexed before serialization.

Declaration

cs-api-definition
public override T LoadFromDisk(string pathToFile, bool autoLoadTypes)

Parameters

pathToFile

string

The path to file.

autoLoadTypes

bool

The auto load types.

Returns

T

Overrides FileHandlerBase<T>.LoadFromDisk(string, bool)

SaveToDisk(string, T)

Declaration

cs-api-definition
public string SaveToDisk(string filePath, T data)

Parameters

filePath

string

data

T

Returns

string