private static void CheckForDuplicateIds(IEnumerable<ChangeScript> scripts)
{
string lastKey = null;
// Since scripts are ordered, if one following is the same, we know there is a duplicate.
foreach (var script in scripts)
{
if (string.Equals(script.UniqueKey, lastKey, StringComparison.InvariantCultureIgnoreCase))
{
throw new DuplicateChangeScriptException(string.Format("There is more than one change script with key '{0}'.", lastKey));
}
lastKey = script.UniqueKey;
}
}
}