Class AbstractFileWrapper<TOptions>
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Core.Data.Wrapper.File
Assembly: Mars.Core.dll
Syntax
public abstract class AbstractFileWrapper<TOptions> : AbstractWrapper<TOptions>, IWrapper, IDisposable where TOptions : AbstractFileOptions
Type Parameters
Name | Description |
---|---|
TOptions |
Constructors
| Improve this Doc View SourceAbstractFileWrapper(IConfigLoader, ISerializerManager, TOptions)
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Declaration
protected AbstractFileWrapper(IConfigLoader config, ISerializerManager serializer, TOptions fileOptions)
Parameters
Type | Name | Description |
---|---|---|
IConfigLoader | config | |
ISerializerManager | serializer | |
TOptions | fileOptions |
Fields
| Improve this Doc View SourceTypeHeaders
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Declaration
protected readonly IDictionary<IOutputLogger, (StreamWriter, Stream)> TypeHeaders
Field Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<IOutputLogger, System.ValueTuple<System.IO.StreamWriter, System.IO.Stream>> |
Properties
| Improve this Doc View SourceFileSystem
Gets the file system access layer to interact with files and folders.
Declaration
protected IFileSystem FileSystem { get; }
Property Value
Type | Description |
---|---|
System.IO.Abstractions.IFileSystem |
Methods
| Improve this Doc View SourceDispose()
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceGetPath(String, String, Nullable<Boolean>)
An abstract implementation for all file-based wrapper reading/writing data from and into files.
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)
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Declaration
protected bool GetStreamWriter(string fileKey, IOutputLogger typeLogger, out StreamWriter streamWriter)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileKey | |
IOutputLogger | typeLogger | |
System.IO.StreamWriter | streamWriter |
Returns
Type | Description |
---|---|
System.Boolean |
Setup()
An abstract implementation for all file-based wrapper reading/writing data from and into files.
Declaration
public override void Setup()
Overrides
Mars.Core.Data.Wrapper.AbstractWrapper<TOptions>.Setup()
Implements
System.IDisposable