//#if !NO_GENERICS
//using System.Collections.Generic;
//namespace ProtoBuf
//{
// ///
// /// Mutable version of the common key/value pair struct; used during serialization. This type is intended for internal use only and should not
// /// be used by calling code; it is required to be public for implementation reasons.
// ///
// [ProtoContract]
// public struct KeyValuePairSurrogate
// {
// private TKey key;
// private TValue value;
// ///
// /// The key of the pair.
// ///
// [ProtoMember(1, IsRequired = true)]
// public TKey Key { get { return key; } set { key = value; } }
// ///
// /// The value of the pair.
// ///
// [ProtoMember(2)]
// public TValue Value{ get { return value; } set { this.value = value; } }
// private KeyValuePairSurrogate(TKey key, TValue value)
// {
// this.key = key;
// this.value = value;
// }
// ///
// /// Convert a surrogate instance to a standard pair instance.
// ///
// public static implicit operator KeyValuePair (KeyValuePairSurrogate value)
// {
// return new KeyValuePair(value.key, value.value);
// }
// ///
// /// Convert a standard pair instance to a surrogate instance.
// ///
// public static implicit operator KeyValuePairSurrogate(KeyValuePair value)
// {
// return new KeyValuePairSurrogate(value.Key, value.Value);
// }
// }
//}
//#endif