C# 클래스 NLog.Internal.FileAppenders.FileAppenderCache

Maintains a collection of file appenders usually associated with file targets.
파일 보기 프로젝트 열기: NLog/NLog 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Empty FileAppenderCache

공개 메소드들

메소드 설명
AllocateAppender ( string fileName ) : BaseFileAppender

It allocates the first slot in the list when the file name does not already in the list and clean up any unused slots.

CloseAppenders ( ) : void

Close all the allocated appenders.

CloseAppenders ( System.DateTime expireTime ) : void

Close the allocated appenders initialised before the supplied time.

Dispose ( ) : void
FileAppenderCache ( int size, IFileAppenderFactory appenderFactory, ICreateFileParameters createFileParams ) : System

Initializes a new instance of the FileAppenderCache class.

The size of the list should be positive. No validations are performed during initialisation as it is an intenal class.

FlushAppenders ( ) : void

Fluch all the allocated appenders.

GetArchiveMutex ( string fileName ) : Mutex
GetFileCreationTimeUtc ( string filePath, bool fallback ) : DateTime?
GetFileLastWriteTimeUtc ( string filePath, bool fallback ) : DateTime?
GetFileLength ( string filePath, bool fallback ) : long?
InvalidateAppender ( string filePath ) : void

Closes the specified appender and removes it from the list.

InvalidateAppendersForInvalidFiles ( ) : void

Invalidates appenders for all files that were archived.

비공개 메소드들

메소드 설명
CloseAppender ( BaseFileAppender appender ) : void
ExternalFileArchivingWatcher_OnFileChanged ( object sender, FileSystemEventArgs e ) : void
FileAppenderCache ( ) : System

Initializes a new "empty" instance of the FileAppenderCache class with zero size and empty list of appenders.

GetAppender ( string fileName ) : BaseFileAppender

메소드 상세

AllocateAppender() 공개 메소드

It allocates the first slot in the list when the file name does not already in the list and clean up any unused slots.
/// Thrown when is called on an Empty instance. ///
public AllocateAppender ( string fileName ) : BaseFileAppender
fileName string File name associated with a single appender.
리턴 BaseFileAppender

CloseAppenders() 공개 메소드

Close all the allocated appenders.
public CloseAppenders ( ) : void
리턴 void

CloseAppenders() 공개 메소드

Close the allocated appenders initialised before the supplied time.
public CloseAppenders ( System.DateTime expireTime ) : void
expireTime System.DateTime The time which prior the appenders considered expired
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

FileAppenderCache() 공개 메소드

Initializes a new instance of the FileAppenderCache class.
The size of the list should be positive. No validations are performed during initialisation as it is an intenal class.
public FileAppenderCache ( int size, IFileAppenderFactory appenderFactory, ICreateFileParameters createFileParams ) : System
size int Total number of appenders allowed in list.
appenderFactory IFileAppenderFactory Factory used to create each appender.
createFileParams ICreateFileParameters Parameters used for creating a file.
리턴 System

FlushAppenders() 공개 메소드

Fluch all the allocated appenders.
public FlushAppenders ( ) : void
리턴 void

GetArchiveMutex() 공개 메소드

public GetArchiveMutex ( string fileName ) : Mutex
fileName string
리턴 Mutex

GetFileCreationTimeUtc() 공개 메소드

public GetFileCreationTimeUtc ( string filePath, bool fallback ) : DateTime?
filePath string
fallback bool
리턴 DateTime?

GetFileLastWriteTimeUtc() 공개 메소드

public GetFileLastWriteTimeUtc ( string filePath, bool fallback ) : DateTime?
filePath string
fallback bool
리턴 DateTime?

GetFileLength() 공개 메소드

public GetFileLength ( string filePath, bool fallback ) : long?
filePath string
fallback bool
리턴 long?

InvalidateAppender() 공개 메소드

Closes the specified appender and removes it from the list.
public InvalidateAppender ( string filePath ) : void
filePath string File name of the appender to be closed.
리턴 void

InvalidateAppendersForInvalidFiles() 공개 메소드

Invalidates appenders for all files that were archived.
public InvalidateAppendersForInvalidFiles ( ) : void
리턴 void

프로퍼티 상세

Empty 공개적으로 정적으로 프로퍼티

An "empty" instance of the FileAppenderCache class with zero size and empty list of appenders.
public static FileAppenderCache,NLog.Internal.FileAppenders Empty
리턴 FileAppenderCache