public ExpandStartTo ( System.DateTime moment ) : void | ||
moment | System.DateTime | |
리턴 | void |
public virtual void ExpandStartTo( DateTime moment )
{
CheckModification();
if ( start > moment )
{
start = moment;
}
}
public void ExpandStartToTest() { TimeRange timeRange = new TimeRange( start, end ); timeRange.ExpandStartTo( start.AddMilliseconds( 1 ) ); Assert.AreEqual( timeRange.Start, start ); timeRange.ExpandStartTo( start.AddMinutes( -1 ) ); Assert.AreEqual( timeRange.Start, start.AddMinutes( -1 ) ); }