private void _worker_DoWork(object sender, DoWorkEventArgs e)
 {
     WorkerArgument arg = e.Argument as WorkerArgument;
     ICollection<string> words = new WordGenerator().GenerateWords(arg.Size, arg.Choices);
     string[] wordsArray = new string[words.Count];
     words.CopyTo(wordsArray, 0);
     e.Result = wordsArray;
 }
Esempio n. 2
0
        private void _worker_DoWork(object sender, DoWorkEventArgs e)
        {
            WorkerArgument       arg   = e.Argument as WorkerArgument;
            ICollection <string> words = new WordGenerator().GenerateWords(arg.Size, arg.Choices);

            string[] wordsArray = new string[words.Count];
            words.CopyTo(wordsArray, 0);
            e.Result = wordsArray;
        }