internal static void FlattenDomain(IProgress progress, bool writeVerbose, SortedDictionary <string, XElement> highLevelData, SortedDictionary <string, XElement> sortedData, string rootDir)
        {
            var generalBaseDir = Path.Combine(rootDir, SharedConstants.General);

            if (!Directory.Exists(generalBaseDir))
            {
                return;
            }

            // Do in reverse order from nesting.
            if (writeVerbose)
            {
                progress.WriteVerbose("Collecting the general data....");
                progress.WriteVerbose("Collecting the language project data....");
            }
            else
            {
                progress.WriteMessage("Collecting the general data....");
                progress.WriteMessage("Collecting the language project data....");
            }
            GeneralDomainBoundedContext.FlattenContext(highLevelData, sortedData, generalBaseDir);

            if (writeVerbose)
            {
                progress.WriteVerbose("Collecting the user-defined list data....");
            }
            else
            {
                progress.WriteMessage("Collecting the user-defined list data....");
            }
            UserDefinedListsBoundedContextService.FlattenContext(highLevelData, sortedData, generalBaseDir);
        }