using System; namespace ProtoBuf { /// /// 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 /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class ProtoMapAttribute : Attribute { /// /// Describes the data-format used to store the key /// public DataFormat KeyFormat { get; set; } /// /// Describes the data-format used to store the value /// public DataFormat ValueFormat { get; set; } /// /// 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" /// public bool DisableMap { get; set; } } }