C# Class NLog.Internal.FileAppenders.BaseFileAppender

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

Public Methods

Method 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.

Protected Methods

Method 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

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

Method Details

BaseFileAppender() public method

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.
return System

Close() public abstract method

Closes this instance.
public abstract Close ( ) : void
return void

CreateFileStream() protected method

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

Dispose() public method

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

Dispose() protected method

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.
return void

FileTouched() protected method

Records the last write time for a file.
protected FileTouched ( ) : void
return void

FileTouched() protected method

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.
return void

Flush() public abstract method

Flushes this instance.
public abstract Flush ( ) : void
return void

GetFileInfo() public abstract method

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.
return bool

Write() public abstract method

Writes the specified bytes.
public abstract Write ( byte bytes ) : void
bytes byte The bytes.
return void