Exemple #1
0
        /// <summary>
        /// Method to call the ResultIterator object's GenerateAndPublishRow method.
        /// </summary>
        /// <param name="generator"></param>
        private void PopulateTable(ResultIterator generator)
        {
            Task ptask = Task.Factory.StartNew(() => generator.GenerateAndPublishRow());

            #region old code
            //foreach (var result in iterator)
            //{
            //    if (result == null)
            //        continue;
            //    string comment = result.Comment.SourceVersion + " " + result.Comment.CommentState + " ";
            //    comment += result.Comment.DestinationVersion != null ? (Int32.Parse(result.Comment.DestinationVersion) > 0 ? result.Comment.DestinationVersion : "" ) : "";

            //    Dispatcher.Invoke(() =>
            //    {
            //        AddDisplayRowItem(result, comment);
            //    }
            //    );
            //    //Task dataDisplay = Task.Factory.StartNew(() => AddDisplayRowItem(result, comment));
            //    //DataGridTable.Items.Add(new ResultItem(result.SourceResult.Filename, result.SourceResult.FilePath, result.SourceResult.CurrentVersion,
            //    //                                        result.SourceResult.Status.ToString(), "", result.DestinationResult.Filename, result.DestinationResult.FilePath,
            //    //                                        result.DestinationResult.CurrentVersion, result.DestinationResult.Status.ToString(), comment));
            //}
            #endregion
        }