diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs index 8571a5eb..d51ee526 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs @@ -32,11 +32,14 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { + /// <summary> + /// Describes a "oneof" field collection in a message type: a set of + /// fields of which at most one can be set in any particular message. + /// </summary> public sealed class OneofDescriptor : DescriptorBase { private readonly OneofDescriptorProto proto; @@ -59,13 +62,33 @@ namespace Google.Protobuf.Reflection /// </summary> public override string Name { get { return proto.Name; } } + /// <summary> + /// Gets the message type containing this oneof. + /// </summary> + /// <value> + /// The message type containing this oneof. + /// </value> public MessageDescriptor ContainingType { get { return containingType; } } + /// <summary> + /// Gets the fields within this oneof, in declaration order. + /// </summary> + /// <value> + /// The fields within this oneof, in declaration order. + /// </value> public IList<FieldDescriptor> Fields { get { return fields; } } + /// <summary> + /// Gets an accessor for reflective access to the values associated with the oneof + /// in a particular message. + /// </summary> + /// <value> + /// The accessor used for reflective access, or <c>null</c> if reflection is not + /// supported by this descriptor. + /// </value> public OneofAccessor Accessor { get { return accessor; } } internal void CrossLink() |