C# Класс Recognos.Core.FileUtilities

Utilities for handling files
Показать файл Открыть проект

Открытые методы

Метод Описание
ReadBinaryContent ( this stream ) : byte[]

Reads the content from the stream as binary.

ReadBinaryContentAsync ( this stream ) : Task

Reads the content from the stream as binary.

ReadContent ( this stream ) : string

Reads the content from the stream.

ReadContent ( this stream, Encoding encoding ) : string

Reads the content from the stream.

ReadContentAsync ( this stream ) : Task

Reads the content from the stream.

ReadContentAsync ( this stream, Encoding encoding ) : Task

Reads the content from the stream.

SaveToFile ( this stream, string pathToFile ) : void

Saves a stream to a file.

SaveToFileAsync ( this stream, string pathToFile ) : System.Threading.Tasks.Task

Saves a stream to a file.

SaveToStream ( this stream, Stream outputStream ) : void

Saves a stream to another stream.

SaveToStreamAsync ( this stream, Stream outputStream ) : System.Threading.Tasks.Task

Saves a stream to another stream.

Приватные методы

Метод Описание
ComputeSHA1Hash ( string pathToFile ) : string
ComputeSHA1Hash ( this stream ) : string

Описание методов

ReadBinaryContent() публичный статический Метод

Reads the content from the stream as binary.
public static ReadBinaryContent ( this stream ) : byte[]
stream this The stream.
Результат byte[]

ReadBinaryContentAsync() публичный статический Метод

Reads the content from the stream as binary.
public static ReadBinaryContentAsync ( this stream ) : Task
stream this The stream.
Результат Task

ReadContent() публичный статический Метод

Reads the content from the stream.
public static ReadContent ( this stream ) : string
stream this The stream.
Результат string

ReadContent() публичный статический Метод

Reads the content from the stream.
public static ReadContent ( this stream, Encoding encoding ) : string
stream this The stream.
encoding System.Text.Encoding The encoding.
Результат string

ReadContentAsync() публичный статический Метод

Reads the content from the stream.
public static ReadContentAsync ( this stream ) : Task
stream this The stream.
Результат Task

ReadContentAsync() публичный статический Метод

Reads the content from the stream.
public static ReadContentAsync ( this stream, Encoding encoding ) : Task
stream this The stream.
encoding System.Text.Encoding The encoding.
Результат Task

SaveToFile() публичный статический Метод

Saves a stream to a file.
public static SaveToFile ( this stream, string pathToFile ) : void
stream this The stream.
pathToFile string The path to file.
Результат void

SaveToFileAsync() публичный статический Метод

Saves a stream to a file.
public static SaveToFileAsync ( this stream, string pathToFile ) : System.Threading.Tasks.Task
stream this The stream.
pathToFile string The path to file.
Результат System.Threading.Tasks.Task

SaveToStream() публичный статический Метод

Saves a stream to another stream.
public static SaveToStream ( this stream, Stream outputStream ) : void
stream this The input stream.
outputStream System.IO.Stream The output stream.
Результат void

SaveToStreamAsync() публичный статический Метод

Saves a stream to another stream.
public static SaveToStreamAsync ( this stream, Stream outputStream ) : System.Threading.Tasks.Task
stream this The input stream.
outputStream System.IO.Stream The output stream.
Результат System.Threading.Tasks.Task