diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
index a8b9e69f44..dee0913502 100644
--- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
@@ -66,7 +66,10 @@ namespace Google.Protobuf.Reflection
internal FieldDescriptorProto Proto { get; }
- internal Extension Extension { get; }
+ ///
+ /// An extension identifier for this field, or null if this field isn't an extension.
+ ///
+ public Extension Extension { get; }
internal FieldDescriptor(FieldDescriptorProto proto, FileDescriptor file,
MessageDescriptor parent, int index, string propertyName, Extension extension)
@@ -201,19 +204,19 @@ namespace Google.Protobuf.Reflection
///
/// Returns true if this field is a packed, repeated field; false otherwise.
///
- public bool IsPacked
- {
- get
- {
- if (File.Syntax != Syntax.Proto3)
- {
- return Proto.Options?.Packed ?? false;
- }
- else
- {
- return !Proto.Options.HasPacked || Proto.Options.Packed;
- }
- }
+ public bool IsPacked
+ {
+ get
+ {
+ if (File.Syntax != Syntax.Proto3)
+ {
+ return Proto.Options?.Packed ?? false;
+ }
+ else
+ {
+ return !Proto.Options.HasPacked || Proto.Options.Packed;
+ }
+ }
}
///
@@ -393,7 +396,7 @@ namespace Google.Protobuf.Reflection
}
private IFieldAccessor CreateAccessor()
- {
+ {
if (Extension != null)
{
return new ExtensionAccessor(this);