コード例 #1
0
 /// <summary>
 /// Generate documents
 /// </summary>
 /// <param name="nbDocs">The number of documents to generate</param>
 /// <param name="destFolder">Destination folder</param>
 /// <param name="nbFilesPerFolder">Number of files per folder</param>
 /// <param name="nbFoldersPerFolder">Number of folders per folder</param>
 /// <param name="nbParaPerDoc">Number of paragraphs per document</param>
 /// <param name="nbWordsPerPara">Number of words per paragraph</param>
 public async Task Generate(long nbDocs, string destFolder, int nbFilesPerFolder = 1000, int nbFoldersPerFolder = 100, int nbParaPerDoc = 10, int nbWordsPerPara = 50)
 {
     var gen = new InternalGeneration(nbDocs, destFolder, nbFilesPerFolder, nbFoldersPerFolder, nbParaPerDoc, nbWordsPerPara);
     gen.Progress += Gen_Progress;
     await Task.Factory.StartNew(() =>
     {
         gen.Launch();
     });
 }
コード例 #2
0
        /// <summary>
        /// Generate documents
        /// </summary>
        /// <param name="nbDocs">The number of documents to generate</param>
        /// <param name="destFolder">Destination folder</param>
        /// <param name="nbFilesPerFolder">Number of files per folder</param>
        /// <param name="nbFoldersPerFolder">Number of folders per folder</param>
        /// <param name="nbParaPerDoc">Number of paragraphs per document</param>
        /// <param name="nbWordsPerPara">Number of words per paragraph</param>
        public async Task Generate(long nbDocs, string destFolder, int nbFilesPerFolder = 1000, int nbFoldersPerFolder = 100, int nbParaPerDoc = 10, int nbWordsPerPara = 50)
        {
            var gen = new InternalGeneration(nbDocs, destFolder, nbFilesPerFolder, nbFoldersPerFolder, nbParaPerDoc, nbWordsPerPara);

            gen.Progress += Gen_Progress;
            await Task.Factory.StartNew(() =>
            {
                gen.Launch();
            });
        }