XCore.XMessageBoxExManager.AddSavedResponsesSafely C# (CSharp) Method

AddSavedResponsesSafely() private method

private AddSavedResponsesSafely ( string>.Dictionary responseDict, StringPair pair ) : void
responseDict string>.Dictionary
pair StringPair
return void
		private void AddSavedResponsesSafely(Dictionary<string, string> responseDict, StringPair pair)
		{
			// The original code here threw an exception if the pair key was already in the dictionary.
			// We don't want to overwrite what's in memory with what's on disk, so we'll skip them in that case.
			string dummyValue;
			if(responseDict.TryGetValue(pair.key, out dummyValue))
				return;
			responseDict.Add(pair.key, pair.value);
		}