private void SortModule(ModuleDescriptor moduleDescriptor, IEnumerable<ModuleDescriptor> moduleDescriptors) { if (!moduleDescriptor.Dependencies.Any()) { return; } foreach (var parentModule in moduleDescriptor.Dependencies.Select(dependency => moduleDescriptors.SingleOrDefault(m => m.ModuleType == dependency)) .Where(parentModule => parentModule != null)) { parentModule.MarkAsParent(); // update all parents of this parent as well SortModule(parentModule, moduleDescriptors); } }
public void AddExecutionInfo(ModuleDescriptor moduleDescriptor, long elapsedMilliseconds) { this._log.AppendLine(string.Format("{0} executed in {1}ms", moduleDescriptor.ModuleType.Name, elapsedMilliseconds)); }
public void AddError(ModuleDescriptor moduleDescriptor, string message) { this._log.AppendLine(string.Format("Error in module {0}: " + message, moduleDescriptor.ModuleType.Name)); }