|
@@ -42,23 +42,23 @@ using static Google.Protobuf.Reflection.SourceCodeInfo.Types;
|
|
|
|
|
|
namespace Google.Protobuf.Reflection
|
|
namespace Google.Protobuf.Reflection
|
|
{
|
|
{
|
|
- /// <summary>
|
|
|
|
- /// The syntax of a .proto file
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The syntax of a .proto file
|
|
/// </summary>
|
|
/// </summary>
|
|
- public enum Syntax
|
|
|
|
- {
|
|
|
|
- /// <summary>
|
|
|
|
- /// Proto2 syntax
|
|
|
|
- /// </summary>
|
|
|
|
- Proto2,
|
|
|
|
- /// <summary>
|
|
|
|
- /// Proto3 syntax
|
|
|
|
- /// </summary>
|
|
|
|
- Proto3,
|
|
|
|
- /// <summary>
|
|
|
|
- /// An unknown declared syntax
|
|
|
|
- /// </summary>
|
|
|
|
- Unknown
|
|
|
|
|
|
+ public enum Syntax
|
|
|
|
+ {
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// Proto2 syntax
|
|
|
|
+ /// </summary>
|
|
|
|
+ Proto2,
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// Proto3 syntax
|
|
|
|
+ /// </summary>
|
|
|
|
+ Proto3,
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// An unknown declared syntax
|
|
|
|
+ /// </summary>
|
|
|
|
+ Unknown
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -107,17 +107,17 @@ namespace Google.Protobuf.Reflection
|
|
|
|
|
|
declarations = new Lazy<Dictionary<IDescriptor, DescriptorDeclaration>>(CreateDeclarationMap, LazyThreadSafetyMode.ExecutionAndPublication);
|
|
declarations = new Lazy<Dictionary<IDescriptor, DescriptorDeclaration>>(CreateDeclarationMap, LazyThreadSafetyMode.ExecutionAndPublication);
|
|
|
|
|
|
- if (!proto.HasSyntax || proto.Syntax == "proto2")
|
|
|
|
- {
|
|
|
|
- Syntax = Syntax.Proto2;
|
|
|
|
|
|
+ if (!proto.HasSyntax || proto.Syntax == "proto2")
|
|
|
|
+ {
|
|
|
|
+ Syntax = Syntax.Proto2;
|
|
}
|
|
}
|
|
- else if (proto.Syntax == "proto3")
|
|
|
|
- {
|
|
|
|
- Syntax = Syntax.Proto3;
|
|
|
|
|
|
+ else if (proto.Syntax == "proto3")
|
|
|
|
+ {
|
|
|
|
+ Syntax = Syntax.Proto3;
|
|
}
|
|
}
|
|
- else
|
|
|
|
- {
|
|
|
|
- Syntax = Syntax.Unknown;
|
|
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Syntax = Syntax.Unknown;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -249,8 +249,8 @@ namespace Google.Protobuf.Reflection
|
|
/// </value>
|
|
/// </value>
|
|
internal FileDescriptorProto Proto { get; }
|
|
internal FileDescriptorProto Proto { get; }
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// The syntax of the file
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// The syntax of the file
|
|
/// </summary>
|
|
/// </summary>
|
|
public Syntax Syntax { get; }
|
|
public Syntax Syntax { get; }
|
|
|
|
|