aboutsummaryrefslogtreecommitdiff
path: root/csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs
blob: c8d238586e2c388f74114b88cd4383a37cc0c9aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;

namespace Google.ProtocolBuffers.Descriptors {
  /// <summary>
  /// Allows enum values to express the index within their descriptor.
  /// TODO(jonskeet): Consider removing this. I don't think we need it after all.
  /// </summary>
  [AttributeUsage(AttributeTargets.Field)]
  public class EnumDescriptorIndexAttribute : Attribute {
    readonly int index;

    internal int Index {
      get { return index; }
    }

    internal EnumDescriptorIndexAttribute(int index) {
      this.index = index;
    }
  }
}