public void GenerateProjects(int hours) { var projectByCreationTime = generateProjects( hours, MarketBehaviour.ClockIntervalHours, MarketBehaviour.NewProjectProbability, ProjectFactory); if (ProjectByCreationTimeInHours == null) { ProjectByCreationTimeInHours = projectByCreationTime; } else { foreach (var pair in projectByCreationTime) { if (ProjectByCreationTimeInHours.ContainsKey(pair.Key)) { throw new InvalidOperationException("Different project generation calls overlap in time scale"); } ProjectByCreationTimeInHours[pair.Key] = pair.Value; } } }