diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-04 15:58:39 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-04 15:58:39 +0100 |
commit | 811fc89f0eb036d95653f5fed4b0ffea292ce791 (patch) | |
tree | e1e724bda1b599c036f7326974829d1bf79a6951 /csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs | |
parent | dc80689af3951d078cb556588eece89dd6860c91 (diff) | |
download | protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.tar.gz protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.tar.bz2 protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.zip |
Document everything, and turn on errors if we fail to document anything in the future.
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() |