public static void AppliesTo(EasterWorkScheduleRule obj, MethodReturnEventArgs<System.Boolean> e, System.DateTime date) { if (obj.CheckValidDate(date)) { var ostern = GetOstersonntag(date.Year); e.Result = ostern.AddDays(obj.Offset ?? 0) == date.Date; } }
public static void ToString(EasterWorkScheduleRule obj, MethodReturnEventArgs<System.String> e) { e.Result = string.Format(e.Result + "; Easter, offset {0} days", obj.Offset); }