Class FileCache
Inheritance
System.Object
FileCache
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class FileCache : IFileCache, ISerializableStorage, IDisposable
Constructors
FileCache(IConfiguration, IFileStorage, ILogger, IMemoryCachingService, IFileRepairer)
Declaration
public FileCache(IConfiguration configuration, IFileStorage fileStorage, ILogger ccLogger, IMemoryCachingService memoryCachingService, IFileRepairer fileRepairer)
Parameters
Methods
AddFile(String, Boolean)
Declaration
public string AddFile(string filePath, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
filePath |
|
| System.Boolean |
isSource |
|
Returns
| Type |
Description |
| System.String |
|
AddFile(String, Stream, Boolean)
Declaration
public string AddFile(string extension, Stream fileData, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
extension |
|
| System.IO.Stream |
fileData |
|
| System.Boolean |
isSource |
|
Returns
| Type |
Description |
| System.String |
|
AddFileWithId(String, Stream, Boolean)
Declaration
public void AddFileWithId(string fileId, Stream fileData, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
| System.IO.Stream |
fileData |
|
| System.Boolean |
isSource |
|
AddFileWithId(String, String, Boolean)
Declaration
public void AddFileWithId(string fileId, string filePath, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
| System.String |
filePath |
|
| System.Boolean |
isSource |
|
Dispose()
Declaration
FileExists(String)
Declaration
public bool FileExists(string fileId)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetInfo(String)
Declaration
public StorageFileInfo GetInfo(string fileId)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
Returns
GetReadStream(String, Boolean)
Declaration
public Stream GetReadStream(string fileId, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
| System.Boolean |
isSource |
|
Returns
| Type |
Description |
| System.IO.Stream |
|
RemoveFile(String)
Declaration
public bool RemoveFile(string fileId)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
Returns
| Type |
Description |
| System.Boolean |
|
RemoveFilesWithPrefix(String)
Declaration
public void RemoveFilesWithPrefix(string prefix)
Parameters
| Type |
Name |
Description |
| System.String |
prefix |
|
UpdateLastAccessTime(String)
Declaration
public void UpdateLastAccessTime(string fileId)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
WriteToStream(String, Action<Stream>, Boolean)
Declaration
public void WriteToStream(string fileId, Action<Stream> action, bool isSource = false)
Parameters
| Type |
Name |
Description |
| System.String |
fileId |
|
| System.Action<System.IO.Stream> |
action |
|
| System.Boolean |
isSource |
|
Implements
System.IDisposable