// Copyright Epic Games, Inc. All Rights Reserved.
namespace HordeServer.Utilities
{
///
/// Extension methods for collections
///
public static class CollectionExtensions
{
///
/// Adds an arbitrary sequence of items to a protobuf map field
///
/// The key type
/// The value type
/// The map to update
/// Sequence of items to add
public static void Add(this Google.Protobuf.Collections.MapField map, IEnumerable> sequence)
{
foreach (KeyValuePair pair in sequence)
{
map.Add(pair.Key, pair.Value);
}
}
}
}