Beispiel #1
0
        public static string ConvertToJson(PMap map)
        {
            var writer = new CompactSettingWriter();

            writer.Visit(map);
            return(writer.outputBuilder.ToString());
        }
Beispiel #2
0
            protected internal override bool ShouldSave(IReadOnlyList <SettingCopy> updates, out string textToSave)
            {
                SettingCopy latestUpdate = updates[updates.Count - 1];

                if (!latestUpdate.EqualTo(RemoteSettings))
                {
                    RemoteSettings = latestUpdate.Commit();
                    textToSave     = CompactSettingWriter.ConvertToJson(RemoteSettings.Map);
                    return(true);
                }

                textToSave = default;
                return(false);
            }