Show / Hide Table of Contents

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.

Inheritance
Object
ArchiveTempFileProvider
Implements
ITempFileProvider
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Documents
Assembly: SoDataBase.dll
Syntax
[TempFileProvider("SuperOffice:DocumentTemp")]
public class ArchiveTempFileProvider : ITempFileProvider, IPlugin

Constructors

ArchiveTempFileProvider()

Declaration
public ArchiveTempFileProvider()

Methods

CheckIfFileExists(String)

Declaration
public bool CheckIfFileExists(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Boolean

CreateFile(String)

Declaration
public string CreateFile(string name)
Parameters
Type Name Description
String name
Returns
Type Description
String

DeleteFile(String)

Declaration
public void DeleteFile(string name)
Parameters
Type Name Description
String name

EnsureDirectoryExists(DirectoryInfo)

Verify that a directory exists, and if not, create all missing folders

Declaration
public static void EnsureDirectoryExists(DirectoryInfo dirInfo)
Parameters
Type Name Description
DirectoryInfo dirInfo

GetLength(String)

Get size of a temporary file

Declaration
public long GetLength(string name)
Parameters
Type Name Description
String name

filename

Returns
Type Description
Int64

Size of file

ReadFileChunk(String, Int64, Byte[])

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)

Declaration
public Stream ReadFileComplete(string name)
Parameters
Type Name Description
String name
Returns
Type Description
Stream

WriteFileChunk(String, Int64, Byte[])

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.

Implements

ITempFileProvider

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top