Class ArchiveTempFileProvider
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Implements
Namespace: SuperOffice.CRM.Documents
Assembly: SoDataBase.dll
Syntax
[SoInject]
public class ArchiveTempFileProvider : Object, ITempFileProvider
Constructors
ArchiveTempFileProvider()
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public ArchiveTempFileProvider()
Methods
CheckIfFileExists(String)
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public bool CheckIfFileExists(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Boolean |
CreateFile(String)
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public string CreateFile(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
String |
DeleteFile(String)
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public void DeleteFile(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
ReadFileChunk(String, Int64, Byte[])
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public int ReadFileChunk(string name, long filePosition, byte[] bufferToUpdate)
Parameters
Type | Name | Description |
---|---|---|
String | name | |
Int64 | filePosition | |
Byte[] | bufferToUpdate |
Returns
Type | Description |
---|---|
Int32 |
ReadFileComplete(String)
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public Stream ReadFileComplete(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Stream |
WriteFileChunk(String, Int64, Byte[])
This class implements the ITempFileProvider interface and makes available temp file services. It uses the Document section in the config file to determine impersonation options and file path.
Declaration
public void WriteFileChunk(string name, long filePosition, byte[] bufferToWriteFrom)
Parameters
Type | Name | Description |
---|---|---|
String | name | |
Int64 | filePosition | |
Byte[] | bufferToWriteFrom |
WriteFileComplete(String, Stream)
Copy all information from DATA stream into the temp file represented by NAME, and close the stream when done.
Declaration
public void WriteFileComplete(string name, Stream data)
Parameters
Type | Name | Description |
---|---|---|
String | name | Temp file name |
Stream | data | Stream to read to the end. This stream is CLOSED after it has been read. |