Lines Matching refs:pair
666 // This will box each pair. Could use IDictionaryEnumerator, but that's ugly in terms of disposal.
667 foreach (DictionaryEntry pair in dictionary)
674 if (pair.Key is string)
676 keyText = (string) pair.Key;
678 else if (pair.Key is bool)
680 keyText = (bool) pair.Key ? "true" : "false";
682 else if (pair.Key is int || pair.Key is uint | pair.Key is long || pair.Key is ulong)
684 keyText = ((IFormattable) pair.Key).ToString("d", CultureInfo.InvariantCulture);
688 if (pair.Key == null)
692 throw new ArgumentException("Unhandled dictionary key type: " + pair.Key.GetType());
696 WriteValue(writer, pair.Value);
706 /// Other than surrogate pair handling, this code is mostly taken from src/google/protobuf/util/internal/json_escaping.cc.
721 // Encountered first part of a surrogate pair.
722 // Check that we have the whole pair, and encode both parts as hex.