public void AddEntry(RepoFile repoFile) { var jsonRepoFile = repoFile.ToJson(); _parseObjects.New(_repoName, jsonRepoFile); }
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); }