C# Класс NLog.Internal.FileAppenders.BaseFileAppender

Base class for optimized file appenders.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
BaseFileAppender ( string fileName, ICreateFileParameters createParameters ) : System

Initializes a new instance of the BaseFileAppender class.

Close ( ) : void

Closes this instance.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Flush ( ) : void

Flushes this instance.

GetFileInfo ( System.DateTime &lastWriteTime, long &fileLength ) : bool

Gets the file info.

Write ( byte bytes ) : void

Writes the specified bytes.

Защищенные методы

Метод Описание
CreateFileStream ( bool allowConcurrentWrite ) : Windows.Storage.Streams.IRandomAccessStream

Creates the file stream.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

FileTouched ( ) : void

Records the last write time for a file.

FileTouched ( System.DateTime dateTime ) : void

Records the last write time for a file to be specific date.

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

Метод Описание
TryCreateFileStream ( bool allowConcurrentWrite ) : Windows.Storage.Streams.IRandomAccessStream
WindowsCreateFile ( string fileName, bool allowConcurrentWrite ) : FileStream

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

BaseFileAppender() публичный Метод

Initializes a new instance of the BaseFileAppender class.
public BaseFileAppender ( string fileName, ICreateFileParameters createParameters ) : System
fileName string Name of the file.
createParameters ICreateFileParameters The create parameters.
Результат System

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

Closes this instance.
public abstract Close ( ) : void
Результат void

CreateFileStream() защищенный Метод

Creates the file stream.
protected CreateFileStream ( bool allowConcurrentWrite ) : Windows.Storage.Streams.IRandomAccessStream
allowConcurrentWrite bool If set to true allow concurrent writes.
Результат Windows.Storage.Streams.IRandomAccessStream

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool True to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

FileTouched() защищенный Метод

Records the last write time for a file.
protected FileTouched ( ) : void
Результат void

FileTouched() защищенный Метод

Records the last write time for a file to be specific date.
protected FileTouched ( System.DateTime dateTime ) : void
dateTime System.DateTime Date and time when the last write occurred.
Результат void

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

Flushes this instance.
public abstract Flush ( ) : void
Результат void

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

Gets the file info.
public abstract GetFileInfo ( System.DateTime &lastWriteTime, long &fileLength ) : bool
lastWriteTime System.DateTime The last write time.
fileLength long Length of the file.
Результат bool

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

Writes the specified bytes.
public abstract Write ( byte bytes ) : void
bytes byte The bytes.
Результат void