mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] TEngineServer
[+] TEngineServer
This commit is contained in:
44
Assets/GameScripts/ThirdParty/Protobuf-net/KeyValuePairProxy.cs
vendored
Normal file
44
Assets/GameScripts/ThirdParty/Protobuf-net/KeyValuePairProxy.cs
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
//using System.Collections.Generic;
|
||||
|
||||
//namespace ProtoBuf
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 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.
|
||||
// /// </summary>
|
||||
// [ProtoContract]
|
||||
// public struct KeyValuePairSurrogate<TKey,TValue>
|
||||
// {
|
||||
// private TKey key;
|
||||
// private TValue value;
|
||||
// /// <summary>
|
||||
// /// The key of the pair.
|
||||
// /// </summary>
|
||||
// [ProtoMember(1, IsRequired = true)]
|
||||
// public TKey Key { get { return key; } set { key = value; } }
|
||||
// /// <summary>
|
||||
// /// The value of the pair.
|
||||
// /// </summary>
|
||||
// [ProtoMember(2)]
|
||||
// public TValue Value{ get { return value; } set { this.value = value; } }
|
||||
// private KeyValuePairSurrogate(TKey key, TValue value)
|
||||
// {
|
||||
// this.key = key;
|
||||
// this.value = value;
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// Convert a surrogate instance to a standard pair instance.
|
||||
// /// </summary>
|
||||
// public static implicit operator KeyValuePair<TKey, TValue> (KeyValuePairSurrogate<TKey, TValue> value)
|
||||
// {
|
||||
// return new KeyValuePair<TKey,TValue>(value.key, value.value);
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// Convert a standard pair instance to a surrogate instance.
|
||||
// /// </summary>
|
||||
// public static implicit operator KeyValuePairSurrogate<TKey, TValue>(KeyValuePair<TKey, TValue> value)
|
||||
// {
|
||||
// return new KeyValuePairSurrogate<TKey, TValue>(value.Key, value.Value);
|
||||
// }
|
||||
// }
|
||||
//}
|
Reference in New Issue
Block a user