private ExtractMetadataInputModel ConvertToInputModel(MetadataJsonItemConfig configModel) { var projects = configModel.Source; // If Root Output folder is specified from command line, use it instead of the base directory var outputFolder = Path.Combine(Config.OutputFolder ?? Config.BaseDirectory ?? string.Empty, configModel.Destination ?? DocAsCode.Constants.DefaultMetadataOutputFolderName); var inputModel = new ExtractMetadataInputModel { PreserveRawInlineComments = configModel?.Raw ?? false, ForceRebuild = configModel?.Force ?? false, ApiFolderName = string.Empty, }; var expandedFileMapping = GlobUtility.ExpandFileMapping(Config.BaseDirectory, projects); inputModel.Items = new Dictionary<string, List<string>> { [outputFolder] = expandedFileMapping.Items.SelectMany(s => s.Files).ToList(), }; return inputModel; }
private ExtractMetadataInputModel ConvertToInputModel(MetadataJsonItemConfig configModel) { var projects = configModel.Source; // If Root Output folder is specified from command line, use it instead of the base directory var outputFolder = Path.Combine(Config.OutputFolder ?? Config.BaseDirectory ?? string.Empty, configModel.Destination ?? Constants.DefaultMetadataOutputFolderName); var inputModel = new ExtractMetadataInputModel { PreserveRawInlineComments = configModel.Raw, ForceRebuild = configModel.Force, ApiFolderName = string.Empty, }; var expandedFileMapping = GlobUtility.ExpandFileMapping(Config.BaseDirectory, projects); inputModel.Items = new Dictionary <string, List <string> > { [outputFolder] = expandedFileMapping.Items.SelectMany(s => s.Files).ToList(), }; return(inputModel); }