// // // //========================================================================================== /// <summary> /// add querystring to the doc properties /// </summary> /// <param name="QS"></param> public void addQueryString(string QS) { try { string[] ampSplit = QS.Split('&'); for (int Ptr = 0; Ptr < ampSplit.GetUpperBound(0) + 1; Ptr++) { string nameValuePair = ampSplit[Ptr]; if (!string.IsNullOrEmpty(nameValuePair)) { if (GenericController.strInstr(1, nameValuePair, "=") != 0) { string[] ValuePair = nameValuePair.Split('='); string key = decodeResponseVariable(encodeText(ValuePair[0])); if (!string.IsNullOrEmpty(key)) { DocPropertyModel docProperty = new DocPropertyModel { name = key, propertyType = DocPropertyModel.DocPropertyTypesEnum.queryString, value = (ValuePair.GetUpperBound(0) > 0) ? decodeResponseVariable(encodeText(ValuePair[1])) : "" }; core.docProperties.setProperty(key, docProperty); } } } } } catch (Exception ex) { LogController.logError(core, ex); throw; } }
// //==================================================================================================== // public void setProperty(string key, DocPropertyModel value) { string propKey = encodeDocPropertyKey(key); if (!string.IsNullOrEmpty(propKey)) { if (docPropertiesDict.ContainsKey(propKey)) { docPropertiesDict.Remove(propKey); } docPropertiesDict.Add(propKey, value); } }
// //==================================================================================================== // public void setProperty(string key, string value, DocPropertyModel.DocPropertyTypesEnum propertyType) { try { DocPropertyModel prop = new DocPropertyModel { nameValue = key, fileSize = 0, fileType = "", name = key, propertyType = propertyType }; prop.nameValue = key + "=" + value; prop.value = value; setProperty(key, prop); } catch (Exception ex) { LogController.logError(core, ex); throw; } }