コード例 #1
0
        internal static ChangeSet FromFlatDictionary(Dictionary <string, object> data)
        {
            ChangesetBranch branch = new ChangesetBranch(new Dictionary <string, ChangeSet>());

            foreach (var item in data)
            {
                branch.addPathedValue(item.Key, item.Value);
            }
            return(branch);
        }
コード例 #2
0
        internal static ChangeSet FromFlatJToken(JToken token)
        {
            ChangesetBranch branch = new ChangesetBranch(new Dictionary <string, ChangeSet>());

            foreach (var item in token.Children <JProperty>())
            {
                branch.addPathedValue(item.Name, ((JValue)item.Value).Value);
            }
            return(branch);
        }