public void LoadProperties() { JObject properties = InitialiserContextProvider.GetContext <double> ().Serialise(); Min = properties.Value <double> ("Min"); Max = properties.Value <double> ("Max"); }
public void LoadProperties() { JObject properties; if (_overrideContext == null) { properties = InitialiserContextProvider.GetContext <int> ().Serialise(); } else { properties = _overrideContext.Serialise(); } Min = properties.Value <int> ("Min"); Max = properties.Value <int> ("Max"); }
protected override void BeforeMutate() { JObject properties = InitialiserContextProvider.GetContext <byte> ().Serialise(); Min = properties.Value <byte> ("Min"); Max = properties.Value <byte> ("Max"); //Let the int based stuff do our heavy lifting, rather than repeat code IntBasedGenomeInitialiserContext intContext = new IntBasedGenomeInitialiserContext(); intContext.Min = Min; intContext.Max = Max; _mutator = new IntBasedMutator(intContext); _mutator.LoadProperties(); AllowUnchecked = properties.Value <bool> ("AllowUnchecked"); }