public void Serialize(Profile profile, StreamWriter stream) { var flatProfile = new FlatProfile(profile); var jsonWriter = new JsonTextWriter(stream); _serializer.Serialize(jsonWriter, flatProfile); }
public IBaseLayerDescriptor DescribeBaseLayer(IWorldInformativeParameters param, IField f) { var profile = new FlatProfile( new CombinerBuilder().Add(new HeightmapGeneratorBuilder().Influence(0.00005f))) ; BaseLayerDescriptor bs = new BaseLayerDescriptor(profile) { WorldParams = param }; if (f != null) { var ds = setDescriptor(f); bs.LayerGlobalParameters = ds; } return(bs); }
public string Serialize(Profile profile) { var flatProfile = new FlatProfile(profile); return(JsonConvert.SerializeObject(flatProfile)); }