public void Build() { Console.WriteLine($"Building CDM chunkId={ChunkId} ..."); foreach (var pb in PersonBuilders) { var result = pb.Value.Value.Build(ChunkData, OffsetManager); ChunkData.AddAttrition(pb.Key, result); } PersonBuilders.Clear(); PersonBuilders = null; Console.WriteLine($"Building CDM chunkId={ChunkId} - complete"); }
public void Build() { Console.WriteLine($"Building CDM chunkId={ChunkId} ..."); //Parallel.ForEach(_personBuilders.Values, pb => pb.Value.Build(_chunk, _offsetManager)); foreach (var pb in PersonBuilders) { var result = pb.Value.Value.Build(_chunk, OffsetManager); //Logger.Write(ChunkId, LogMessageTypes.Info, "Attrition=" + result.ToName()); _chunk.AddAttrition(pb.Key, result); } PersonBuilders.Clear(); PersonBuilders = null; Console.WriteLine($"Building CDM chunkId={ChunkId} - complete"); }