Beispiel #1
0
        private static string Serialise(IValueFor level1)
        {
            var serializeObject = JsonConvert.SerializeObject(level1, Formatting.Indented,
                                                              new JsonSerializerSettings
            {
                ReferenceLoopHandling = ReferenceLoopHandling.Serialize
            });
            var serialised = serializeObject;

            return(serialised);
        }
        protected override SeedableValueFor ConstructInstance(IValueFor value, JObject item)
        {
            var seed = item["_seed"].Value <string>();

            return(new SeedableValueFor(value, seed));
        }
        protected override IValueFor ConstructedInstance(IValueFor value, Dictionary <string, object> parms)
        {
            var seed = parms["seed"].ToString();

            return(new SeedableValueFor(value, seed));
        }
Beispiel #4
0
 public Level1ValueFor(IValueFor iValueFor)
 {
     _iValueFor = iValueFor;
 }
Beispiel #5
0
 protected abstract IValueFor ConstructedInstance(IValueFor value, Dictionary <string, object> parms);
Beispiel #6
0
 protected abstract T ConstructInstance(IValueFor value, JObject item);
 protected override Level0ValueFor ConstructInstance(IValueFor value, JObject item)
 {
     return(new Level0ValueFor(value));
 }
Beispiel #8
0
 protected override IValueFor ConstructedInstance(IValueFor value, Dictionary <string, object> parms)
 {
     return(new Level0ValueFor(value));
 }
 public SeedableValueFor(IValueFor iValueFor, string seed)
 {
     _iValueFor = iValueFor;
     _seed      = seed;
 }