Class AbstractFileWrapper<TOptions>
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Inheritance
IDisposable
AbstractFileWrapper<TOptions>
Assembly: Mars.Core.dll
Syntax
public abstract class AbstractFileWrapper<TOptions> : AbstractWrapper<TOptions>, IWrapper, IDisposable where TOptions : AbstractFileOptions
Type Parameters
Name |
Description |
TOptions |
|
Constructors
AbstractFileWrapper(IConfigLoader, ISerializerManager, TOptions)
Declaration
protected AbstractFileWrapper(IConfigLoader config, ISerializerManager serializer, TOptions fileOptions)
Parameters
Fields
Declaration
protected readonly IDictionary<IOutputLogger, > TypeHeaders
Field Value
Properties
FileSystem
Gets the file system access layer to interact with files and folders.
Declaration
protected IFileSystem FileSystem { get; }
Property Value
Type |
Description |
IFileSystem |
|
Methods
Dispose()
Declaration
public override void Dispose()
Overrides
GetPath(String, String, Nullable<Boolean>)
Declaration
protected string GetPath(string typeName, string fileExtensionsWithDot, bool? distinctFiles = null)
Parameters
Type |
Name |
Description |
System.String |
typeName |
|
System.String |
fileExtensionsWithDot |
|
System.Nullable<System.Boolean> |
distinctFiles |
|
Returns
Type |
Description |
System.String |
|
GetStreamWriter(String, IOutputLogger, out StreamWriter)
Declaration
protected bool GetStreamWriter(string fileKey, IOutputLogger typeLogger, out StreamWriter streamWriter)
Parameters
Type |
Name |
Description |
System.String |
fileKey |
|
IOutputLogger |
typeLogger |
|
StreamWriter |
streamWriter |
|
Returns
Type |
Description |
System.Boolean |
|
Setup()
Declaration
public override void Setup()
Overrides
Mars.Core.Data.Wrapper.AbstractWrapper<TOptions>.Setup()
Implements
IDisposable