C# Class NLog.Internal.FileAppenders.BaseFileAppender

Base class for optimized file appenders.
Inheritance: IDisposable
Afficher le fichier Open project: shiftkey/winrt-backport-hilarity Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
TryCreateFileStream ( bool allowConcurrentWrite ) : Windows.Storage.Streams.IRandomAccessStream
WindowsCreateFile ( string fileName, bool allowConcurrentWrite ) : FileStream

Method Details

BaseFileAppender() public méthode

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.
Résultat System

Close() public abstract méthode

Closes this instance.
public abstract Close ( ) : void
Résultat void

CreateFileStream() protected méthode

Creates the file stream.
protected CreateFileStream ( bool allowConcurrentWrite ) : Windows.Storage.Streams.IRandomAccessStream
allowConcurrentWrite bool If set to true allow concurrent writes.
Résultat Windows.Storage.Streams.IRandomAccessStream

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

FileTouched() protected méthode

Records the last write time for a file.
protected FileTouched ( ) : void
Résultat void

FileTouched() protected méthode

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.
Résultat void

Flush() public abstract méthode

Flushes this instance.
public abstract Flush ( ) : void
Résultat void

GetFileInfo() public abstract méthode

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.
Résultat bool

Write() public abstract méthode

Writes the specified bytes.
public abstract Write ( byte bytes ) : void
bytes byte The bytes.
Résultat void