Beispiel #1
0
        public static DateTimeSpecification Parse(string json)
        {
            var serializer = new JsonSerializer()
            {
                DefaultValueHandling = DefaultValueHandling.Ignore,
                NullValueHandling    = NullValueHandling.Ignore
            };

            using (var reader = new JsonTextReader(new StringReader(json)))
            {
                DateTimeSpecification spec = serializer.Deserialize <DateTimeSpecification>(reader);
                return(spec);
            }
        }
Beispiel #2
0
 public DateTimeRange(DateTimeSpecification singleUnit)
 {
     Start = singleUnit; singleUnit.Boundary = DateTimeSpecificationBounds.Lower;
     End   = singleUnit; singleUnit.Boundary = DateTimeSpecificationBounds.Upper;
 }