Esempio n. 1
0
        public DateTimeToClip(string min, string max)
        {
            var caster = new DateTimeCaster();

            Min = caster.Execute(min);
            Max = caster.Execute(max);
        }
Esempio n. 2
0
        protected override bool Apply(object x)
        {
            var caster = new DateTimeCaster();
            var dtX    = caster.Execute(x);
            var dtY    = caster.Execute(Reference);

            return(Compare(dtX, dtY));
        }
Esempio n. 3
0
        protected override bool Apply(object x)
        {
            var caster = new DateTimeCaster();
            var dtX    = caster.Execute(x);

            return((dtX.TimeOfDay.Ticks) % (new TimeSpan(1, 0, 0).Ticks) == 0);
        }
Esempio n. 4
0
        protected override bool ApplyWithReference(object reference, object x)
        {
            var builder = new DateTimeIntervalBuilder(reference);

            builder.Build();
            var interval = builder.GetInterval();

            var caster = new DateTimeCaster();
            var dtX    = caster.Execute(x);

            return(interval.Contains(dtX));
        }
Esempio n. 5
0
        private object EvaluateUncasted(object value)
        {
            if (value as string == "(null)" || (value is string && string.IsNullOrEmpty(value as string)))
            {
                return(EvaluateNull());
            }

            var caster   = new DateTimeCaster();
            var dateTime = caster.Execute(value);

            return(EvaluateDateTime(dateTime));
        }
Esempio n. 6
0
        private object EvaluateUncasted(object value)
        {
            if (value as string == "null")
            {
                EvaluateNull();
            }

            var caster   = new DateTimeCaster();
            var dateTime = caster.Execute(value);

            return(EvaluateDateTime(dateTime));
        }
Esempio n. 7
0
        private DateTime?CastToDateTime(object obj)
        {
            if (obj == null)
            {
                return(null);
            }

            var caster = new DateTimeCaster();

            if (caster.IsValid(obj))
            {
                return(caster.Execute(obj));
            }

            throw new ArgumentException();
        }
Esempio n. 8
0
        public NullToDate(string date)
        {
            var caster = new DateTimeCaster();

            DefaultDate = caster.Execute(date);
        }
Esempio n. 9
0
        public NullToDate(string dt)
        {
            var caster = new DateTimeCaster();

            Default = caster.Execute(dt);
        }