HasInside() public static method

기간안에 대상 시각이 포함되는지 여부
public static HasInside ( this period, System.DateTime target ) : bool
period this 기간
target System.DateTime 대상 일자
return bool
Ejemplo n.º 1
0
 /// <summary>
 /// 지정한 기간이 현 기간 내에 속하는지 검사합니다.
 /// </summary>
 /// <param name="other">대상 기간</param>
 /// <returns></returns>
 public virtual bool HasInside(ITimePeriod other)
 {
     return(TimeTool.HasInside(this, other));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// <paramref name="moment"/> 을 기간안에 포함하는 TimePeriod 들을 열거합니다.
 /// </summary>
 /// <param name="moment"></param>
 /// <returns></returns>
 public virtual IEnumerable <ITimePeriod> IntersectionPeriods(DateTime moment)
 {
     return(_periods.Where(p => TimeTool.HasInside(p, moment)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 지정된 시각이 기간에 속하는지 검사합니다.
 /// </summary>
 /// <param name="moment">검사할 일자</param>
 /// <returns></returns>
 public virtual bool HasInside(DateTime moment)
 {
     return(TimeTool.HasInside(this, moment));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 지정한 기간이 현 기간 내에 속하는지 검사합니다.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public virtual bool HasInside(ITimePeriod other)
 {
     other.ShouldNotBeNull("other");
     return(TimeTool.HasInside(this, other));
 }