/// /// <summary> * Updater /// * </summary> /// * <param name="AtrInfoTable"> [] attrInfo_update: table with element-specific attribute info </param> /// public virtual AttributeInfo updateRemove(AtrInfoTable attrInfo_update) { if (attrInfo_update != null) { if (attribInfoTable.ContainsKey(attrInfo_update.getAttributeName())) { attribInfoTable.Remove(attrInfo_update.getAttributeName()); } } return(this); }
public virtual AttributeInfo updateReplace(AtrInfoTable attrInfo_update) { if (attrInfo_update != null) { // if the table already contains this key, remove it first if (attribInfoTable.ContainsKey(attrInfo_update.getAttributeName())) { attribInfoTable.Remove(attrInfo_update.getAttributeName()); } attribInfoTable.Add(attrInfo_update.getAttributeName(), attrInfo_update.getAtrInfo()); } return(this); }
/// /// <summary> * Updater /// * </summary> /// * <param name="AtrInfoTable"> [] attrInfo_update: table with element-specific attribute info </param> /// public virtual AttributeInfo updateAdd(AtrInfoTable attrInfo_update) { if (attrInfo_update != null) { if (!attribInfoTable.ContainsKey(attrInfo_update.getAttributeName())) { attribInfoTable.Add(attrInfo_update.getAttributeName(), attrInfo_update.getAtrInfo()); } else { // complain about duplicate attribute name } } return(this); }
public virtual AttributeInfo updateReplace(AtrInfoTable[] attrInfo_update) { if (attrInfo_update != null) { for (int i = 0; i < attrInfo_update.Length; i++) { AtrInfoTable attrInfoTable = attrInfo_update[i]; // if the table already contains this key, remove it first if (attribInfoTable.ContainsKey(attrInfoTable.getAttributeName())) { attribInfoTable.Remove(attrInfoTable.getAttributeName()); } attribInfoTable.Add(attrInfoTable.getAttributeName(), attrInfoTable.getAtrInfo()); } } return(this); }