aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs b/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs
index 99ca4bf3..9c2160fe 100644
--- a/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs
+++ b/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs
@@ -53,13 +53,13 @@ namespace Google.Protobuf.Reflection
private readonly HashSet<FileDescriptor> dependencies;
- internal DescriptorPool(FileDescriptor[] dependencyFiles)
+ internal DescriptorPool(IEnumerable<FileDescriptor> dependencyFiles)
{
dependencies = new HashSet<FileDescriptor>();
- for (int i = 0; i < dependencyFiles.Length; i++)
+ foreach (var dependencyFile in dependencyFiles)
{
- dependencies.Add(dependencyFiles[i]);
- ImportPublicDependencies(dependencyFiles[i]);
+ dependencies.Add(dependencyFile);
+ ImportPublicDependencies(dependencyFile);
}
foreach (FileDescriptor dependency in dependencyFiles)