C# Class NLog.Internal.FileAppenders.SingleProcessFileAppender

Optimized single-process file appender which keeps the file open for exclusive write.
Inheritance: BaseFileAppender
ファイルを表示 Open project: NLog/NLog

Public Properties

Property Type Description
TheFactory IFileAppenderFactory

Public Methods

Method Description
Close ( ) : void

Closes this instance.

Flush ( ) : void

Flushes this instance.

GetFileCreationTimeUtc ( ) : DateTime?

Gets the creation time for a file associated with the appender. The time returned is in Coordinated Universal Time [UTC] standard.

GetFileLastWriteTimeUtc ( ) : DateTime?

Gets the last time the file associated with the appeander is written. The time returned is in Coordinated Universal Time [UTC] standard.

GetFileLength ( ) : long?

Gets the length in bytes of the file associated with the appeander.

SingleProcessFileAppender ( string fileName, ICreateFileParameters parameters ) : System

Initializes a new instance of the SingleProcessFileAppender class.

Write ( byte bytes ) : void

Writes the specified bytes.

Method Details

Close() public method

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

Flush() public method

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

GetFileCreationTimeUtc() public method

Gets the creation time for a file associated with the appender. The time returned is in Coordinated Universal Time [UTC] standard.
public GetFileCreationTimeUtc ( ) : DateTime?
return DateTime?

GetFileLastWriteTimeUtc() public method

Gets the last time the file associated with the appeander is written. The time returned is in Coordinated Universal Time [UTC] standard.
public GetFileLastWriteTimeUtc ( ) : DateTime?
return DateTime?

GetFileLength() public method

Gets the length in bytes of the file associated with the appeander.
public GetFileLength ( ) : long?
return long?

SingleProcessFileAppender() public method

Initializes a new instance of the SingleProcessFileAppender class.
public SingleProcessFileAppender ( string fileName, ICreateFileParameters parameters ) : System
fileName string Name of the file.
parameters ICreateFileParameters The parameters.
return System

Write() public method

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

Property Details

TheFactory public_oe static_oe property

public static IFileAppenderFactory TheFactory
return IFileAppenderFactory