private void DeleteFileEntry(JToken fileItem) { _keyValueStorage.Delete(CommonConst.Collection.MODULE_FILE_UPLOAD_CACHE, fileItem[CommonConst.CommonField.DISPLAY_ID].ToString()); _dbService.Delete(CommonConst.Collection.MODULE_FILE_UPLOAD_CACHE, new RawQuery(new JObject() { [CommonConst.CommonField.DISPLAY_ID] = fileItem[CommonConst.CommonField.DISPLAY_ID].ToString(), }.ToString())); }
public JObject InstallPage() { try { var request = _httpContextProxy.GetRequestBody <JObject>(); if (request == null) { return(_responseBuilder.BadRequest()); } var id = request[CommonConst.CommonField.DISPLAY_ID].ToString(); var moduleName = request[CommonConst.CommonField.MODULE_NAME].ToString(); var path = request[CommonConst.CommonField.FILE_PATH].ToString(); var data = request[CommonConst.CommonField.DATA].ToString(); string cleanupWWWRootFilter = "{ " + CommonConst.CommonField.MODULE_NAME + ":'" + moduleName + "', " + CommonConst.CommonField.FILE_PATH + ": '" + path + "'}"; foreach (var item in _dbService.Get(CommonConst.Collection.STATIC_CONTECT, new RawQuery(cleanupWWWRootFilter))) { _keyValueStorage.Delete(CommonConst.Collection.STATIC_CONTECT, item[CommonConst.CommonField.DISPLAY_ID].ToString()); } _keyValueStorage.Put <string>(CommonConst.Collection.STATIC_CONTECT, id, data); request.Remove(CommonConst.CommonField.DATA); WriteToDB(request, moduleName, CommonConst.Collection.STATIC_CONTECT, CommonConst.CommonField.FILE_PATH); return(_responseBuilder.Success()); } catch (Exception ex) { _logger.Error(ex.Message, ex); return(_responseBuilder.ServerError()); } }
public override void Delete(string key) { delegator.Delete(key); }
public async Task <bool> Delete(string key) { return(await _keyValueStorage.Delete(key)); }
public static void DeleteAllData() { Storage.Delete(Key_LaunchCount); Storage.Delete(Key_LastLaunchedAt); }
public void TearDown() { kvs.Delete(key); }