void IDumpRepo.AddComponent(DumpInfo info) { Validate.NotNull(info); var name = info.Component.Name; DumpInfo prev; if (_infos.TryGetValue(name, out prev)) { aggregate_info(info, prev); return; } if (info.Log == null) info.Log = LogFile.New(info.Component.LogName); _infos.Add(name, info); }
void IDumpRepo.AddComponent(DumpInfo info) { lock(_mutex) _impl.AddComponent(info); }
private void aggregate_info(DumpInfo src, DumpInfo dst) { var dumps = new DumpFunc [dst.Dumps.Length + src.Dumps.Length]; dst.Dumps.CopyTo(dumps, 0); src.Dumps.CopyTo(dumps, dst.Dumps.Length); dst.Dumps = dumps; }