private static AdjustHash ( |
||
hash | ||
parameterName | string | |
keyIndex | int | |
addEntry | bool | |
return | void |
private static void AdjustHash(Hashtable hash, string parameterName, int keyIndex, bool addEntry)
{
if (!hash.ContainsKey(parameterName)) return;
int index = (int)hash[parameterName];
if (index < keyIndex) return;
hash[parameterName] = addEntry ? ++index : --index;
}
private void AdjustHashes(int keyIndex, bool addEntry) { for (int i = 0; i < this.Count; i++) { string parameterName = this.items[i].ParameterName; MySqlParameterCollection.AdjustHash(this.indexHashCI, parameterName, keyIndex, addEntry); MySqlParameterCollection.AdjustHash(this.indexHashCS, parameterName, keyIndex, addEntry); } }