EnumDescriptorIndexAttribute.cs 450 B

12345678910111213141516171819
  1. using System;
  2. namespace Google.ProtocolBuffers.Descriptors {
  3. /// <summary>
  4. /// Allows enum values to express the index within their descriptor.
  5. /// </summary>
  6. [AttributeUsage(AttributeTargets.Field)]
  7. internal class EnumDescriptorIndexAttribute : Attribute {
  8. readonly int index;
  9. internal int Index {
  10. get { return index; }
  11. }
  12. internal EnumDescriptorIndexAttribute(int index) {
  13. this.index = index;
  14. }
  15. }
  16. }