RollingFileAppender NextCheckDate Method | Apache log4net™ SDK Documentation

Get the start time of the next window for the current rollpoint

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected DateTime NextCheckDate(
    	DateTime currentDateTime,
    	RollingFileAppenderRollPoint rollPoint
    )

    Protected Function NextCheckDate (
    	currentDateTime As DateTime,
    	rollPoint As RollingFileAppenderRollPoint
    ) As DateTime

    protected:
    DateTime NextCheckDate(
    	DateTime currentDateTime,
    	RollingFileAppenderRollPoint rollPoint
    )

    member NextCheckDate :
            currentDateTime : DateTime *
            rollPoint : RollingFileAppenderRollPoint -> DateTime

#### Parameters

currentDateTime
  Type: System
  DateTime
  the current date
rollPoint
  Type: log4net.Appender
  RollingFileAppender
  RollPoint
  the type of roll point we are working with

#### Return Value

Type: DateTime
the start time for the next roll point an interval after the currentDateTime date
Remarks

Returns the date of the next roll point after the currentDateTime date passed to the method.

The basic strategy is to subtract the time parts that are less significant than the rollpoint from the current time. This should roll the time back to the start of the time window for the current rollpoint. Then we add 1 window worth of time and get the start time of the next window for the rollpoint.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace