FieldMappingAttribute.cs 679 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Google.ProtocolBuffers.Descriptors {
  5. /// <summary>
  6. /// Defined specifically for the <see cref="FieldType" /> enumeration,
  7. /// this allows each field type to specify the mapped type and wire type.
  8. /// </summary>
  9. [AttributeUsage(AttributeTargets.Field)]
  10. internal class FieldMappingAttribute : Attribute {
  11. internal FieldMappingAttribute(MappedType mappedType, WireFormat.WireType wireType) {
  12. MappedType = mappedType;
  13. WireType = wireType;
  14. }
  15. internal MappedType MappedType { get; private set; }
  16. internal WireFormat.WireType WireType { get; private set; }
  17. }
  18. }