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:
29
Assets/GameScripts/ThirdParty/Protobuf-net/ProtoMapAttribute.cs
vendored
Normal file
29
Assets/GameScripts/ThirdParty/Protobuf-net/ProtoMapAttribute.cs
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace ProtoBuf
|
||||
{
|
||||
/// <summary>
|
||||
/// Controls the formatting of elements in a dictionary, and indicates that
|
||||
/// "map" rules should be used: duplicates *replace* earlier values, rather
|
||||
/// than throwing an exception
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
||||
public class ProtoMapAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the data-format used to store the key
|
||||
/// </summary>
|
||||
public DataFormat KeyFormat { get; set; }
|
||||
/// <summary>
|
||||
/// Describes the data-format used to store the value
|
||||
/// </summary>
|
||||
public DataFormat ValueFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disables "map" handling; dictionaries will use ".Add(key,value)" instead of "[key] = value",
|
||||
/// which means duplicate keys will cause an exception (instead of retaining the final value); if
|
||||
/// a proto schema is emitted, it will be produced using "repeated" instead of "map"
|
||||
/// </summary>
|
||||
public bool DisableMap { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user