Exemple #1
0
        /// <summary>
        /// TODO: This needs to be implemented to account for the generic type
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="objectType"></param>
        /// <param name="existingValue"></param>
        /// <param name="serializer"></param>
        /// <returns></returns>
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            JToken Token = JToken.Load(reader);
            IEnumerable <ColumnDomain <T> > Domains = Token["columnDomains"].ToObject <IEnumerable <ColumnDomain <T> > >();

            return(TupleDomain <T> .FromColumnDomains(Domains));
        }
        /// <summary>
        /// TODO: This needs to be implemented to account for the generic type
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="objectType"></param>
        /// <param name="existingValue"></param>
        /// <param name="serializer"></param>
        /// <returns></returns>
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            JObject Token = JObject.Load(reader);
            IEnumerable <ColumnDomain <T> > Domains = Token.GetValue("columnDomains", StringComparison.OrdinalIgnoreCase).ToObject <IEnumerable <ColumnDomain <T> > >();

            return(TupleDomain <T> .FromColumnDomains(Domains));
        }