/// <summary> /// Gives a default file system, strictly based on the provided content, /// to <see cref="CreateWorkspaceProviderFromContentWithFileSystem"/> /// </summary> /// <remarks> /// Consider that if modules are not unique across the array, the file system will be given the union of the specs /// that belong to the same module in some order. /// </remarks> public WorkspaceProvider CreateWorkspaceProviderFromContent( bool preserveTrivia = false, params ModuleRepository[] moduleRepositoryArray) { var fileSystem = new ModuleRepositoryFileSystem(PathTable, moduleRepositoryArray); return(CreateWorkspaceProviderFromContentWithFileSystem(fileSystem, cancelOnFirstFailure: true, preserveTrivia: preserveTrivia, moduleRepositoryArray: moduleRepositoryArray)); }
/// <summary> /// Creates a parsing queue from a set of module names with content. /// </summary> public ModuleParsingQueue CreateParsingQueueFromContent( ModuleRepository[] moduleRepositoryArray, IFileSystem fileSystem = null) { if (fileSystem == null) { fileSystem = new ModuleRepositoryFileSystem(PathTable, moduleRepositoryArray); } var workspaceProvider = CreateWorkspaceProviderFromContentWithFileSystem(fileSystem, cancelOnFirstFailure: false, preserveTrivia: false, moduleRepositoryArray); return(new ModuleParsingQueue( workspaceProvider, workspaceProvider.Configuration, new ModuleReferenceResolver(fileSystem.GetPathTable()), designatedPrelude: null, configurationModule: null)); }