aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs')
-rw-r--r--csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs b/csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs
index 8a3e26fa..307e9dd7 100644
--- a/csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs
+++ b/csharp/src/ProtocolBuffers/Descriptors/FileDescriptor.cs
@@ -54,20 +54,15 @@ namespace Google.ProtocolBuffers.Descriptors
private readonly IList<FileDescriptor> publicDependencies;
private readonly DescriptorPool pool;
- public enum Syntax
+ public enum ProtoSyntax
{
- UNKNOWN,
PROTO2,
PROTO3
}
- public Syntax GetSyntax()
+ public ProtoSyntax Syntax
{
- if (proto.Syntax == "proto3")
- {
- return Syntax.PROTO3;
- }
- return Syntax.PROTO2;
+ get { return proto.Syntax == "proto3" ? ProtoSyntax.PROTO3 : ProtoSyntax.PROTO2; }
}
private FileDescriptor(FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies)