Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange

pull/5936/head
Sydney Acksman 6 years ago
parent 930db675ca
commit 3237ad39f8
  1. 54
      csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs

@ -42,23 +42,23 @@ using static Google.Protobuf.Reflection.SourceCodeInfo.Types;
namespace Google.Protobuf.Reflection namespace Google.Protobuf.Reflection
{ {
/// <summary> /// <summary>
/// The syntax of a .proto file /// The syntax of a .proto file
/// </summary> /// </summary>
public enum Syntax public enum Syntax
{ {
/// <summary> /// <summary>
/// Proto2 syntax /// Proto2 syntax
/// </summary> /// </summary>
Proto2, Proto2,
/// <summary> /// <summary>
/// Proto3 syntax /// Proto3 syntax
/// </summary> /// </summary>
Proto3, Proto3,
/// <summary> /// <summary>
/// An unknown declared syntax /// An unknown declared syntax
/// </summary> /// </summary>
Unknown 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") if (!proto.HasSyntax || proto.Syntax == "proto2")
{ {
Syntax = Syntax.Proto2; Syntax = Syntax.Proto2;
} }
else if (proto.Syntax == "proto3") else if (proto.Syntax == "proto3")
{ {
Syntax = Syntax.Proto3; Syntax = Syntax.Proto3;
} }
else else
{ {
Syntax = Syntax.Unknown; Syntax = Syntax.Unknown;
} }
} }
@ -249,8 +249,8 @@ namespace Google.Protobuf.Reflection
/// </value> /// </value>
internal FileDescriptorProto Proto { get; } internal FileDescriptorProto Proto { get; }
/// <summary> /// <summary>
/// The syntax of the file /// The syntax of the file
/// </summary> /// </summary>
public Syntax Syntax { get; } public Syntax Syntax { get; }

Loading…
Cancel
Save