internal static void WriteNestedDomainData(IProgress progress, bool writeVerbose, string rootDir,
                                                   IDictionary <string, XElement> wellUsedElements,
                                                   IDictionary <string, SortedDictionary <string, byte[]> > classData,
                                                   Dictionary <string, string> guidToClassMapping)
        {
            var generalBaseDir = Path.Combine(rootDir, SharedConstants.General);

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

            FLExProjectSplitter.CheckForUserCancelRequested(progress);
            if (writeVerbose)
            {
                progress.WriteVerbose("Writing the general data....");
                progress.WriteVerbose("Writing user-defined list data....");
            }
            else
            {
                progress.WriteMessage("Writing the general data....");
                progress.WriteMessage("Writing user-defined list data....");
            }
            UserDefinedListsBoundedContextService.NestContext(generalBaseDir, wellUsedElements, classData, guidToClassMapping);

            FLExProjectSplitter.CheckForUserCancelRequested(progress);
            if (writeVerbose)
            {
                progress.WriteVerbose("Writing language project data....");
            }
            else
            {
                progress.WriteMessage("Writing language project data....");
            }
            GeneralDomainBoundedContext.NestContext(generalBaseDir, wellUsedElements, classData, guidToClassMapping);
        }