Skip to content

Commit

Permalink
Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddR…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
ObsidianMinor authored and jtattermusch committed Jul 23, 2019
1 parent 5f2ec57 commit 5995d72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions csharp/src/Google.Protobuf/ExtensionRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public void Add(Extension extension)
/// <summary>
/// Adds the specified extensions to the reigstry
/// </summary>
public void Add(IEnumerable<Extension> newExtensions)
public void AddRange(IEnumerable<Extension> extensions)
{
ProtoPreconditions.CheckNotNull(newExtensions, nameof(newExtensions));
ProtoPreconditions.CheckNotNull(extensions, nameof(extensions));

foreach (var extension in newExtensions)
foreach (var extension in extensions)
Add(extension);
}

Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private void CrossLink()

private static void AddAllExtensions(FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedInfo, ExtensionRegistry registry)
{
registry.Add(dependencies.SelectMany(GetAllDependedExtensions).Concat(GetAllGeneratedExtensions(generatedInfo)).ToArray());
registry.AddRange(dependencies.SelectMany(GetAllDependedExtensions).Concat(GetAllGeneratedExtensions(generatedInfo)).ToArray());
}

private static IEnumerable<Extension> GetAllGeneratedExtensions(GeneratedClrTypeInfo generated)
Expand Down

0 comments on commit 5995d72

Please sign in to comment.