private Dictionary <string, string> GetAssetNamesFromGUIDsAndRemoveOutdatedOnes(MultiValueDictionary <string, string> a_rMultiDict, IEnumerable <string> a_rGUIDs) { Dictionary <string, string> oGUIDNamesDict = new Dictionary <string, string>( ); List <string> oOutdatedGUIDs = new List <string>( ); foreach (string rGUID in a_rGUIDs) { string oName = Uni2DEditorUtils.GetAssetNameFromUnityGUID(rGUID); if (oName != null) { oGUIDNamesDict.Add(rGUID, oName); } else { // Name is null => asset doesn't exist anymore oOutdatedGUIDs.Add(rGUID); } } // Remove the outdated GUID from our multi-value dict foreach (string rOutdatedGUID in oOutdatedGUIDs) { MultiValueDictionary <string, string> .KeyCollection rKeys = a_rMultiDict.Keys; foreach (string rKey in rKeys) { if (a_rMultiDict.ContainsValue(rKey, rOutdatedGUID)) { a_rMultiDict.Remove(rKey, rOutdatedGUID); } } // TODO: save? } return(oGUIDNamesDict); }