Beispiel #1
0
 public void AddEntry(RepoFile repoFile)
 {
     var jsonRepoFile = repoFile.ToJson();
     _parseObjects.New(_repoName, jsonRepoFile);
 }
Beispiel #2
0
        public void UpdateEntry(RepoFile repoFile, Action<RepoFile> onEntryUpdated, Action<RepoFile> onNoEntry)
        {
            Dictionary<string, object> item;
            if (_parseObjects.TryFindByFieldvalue(_repoName, "relativeFilename", HttpUtility.UrlEncode(repoFile.RelativeFileName), out item))
            {
                _parseObjects[_repoName, item["objectId"].ToString()] = repoFile.ToJson();

                onEntryUpdated(item.ToRepoFile());
            }
            else
                onNoEntry(repoFile);
        }