LINQ doesn't help here, as you don't want to query a collection but manipulate one.
As said in the comments above, using a ConcurrentDictionary<Tuple<string, string, string>, SomeObject>
would simplify things a bit. You could do the following then:
using MyDict = ConcurrentDictionary<Tuple<string, string, string>, SomeObject>;
MyDict Merge(IEnumerable<MyDict> dicts)
{
MyDict result = new MyDict();
foreach (var dict in dicts)
{
foreach (var kvp in dict)
{
result.AddOrUpdate(
kvp.Key, // If the key does not exist, add the value;
kvp.Value, // otherwise, combine the two values.
(key, value) => Combine(value, kvp.Value)
);
}
}
return result;
}