/// <summary> /// Initializes a new instance of the <see cref="RunBatchProcessingTaskWindowViewModel"/> class. /// </summary> /// <param name="visualizationContainer">The visualization container.</param> /// <param name="sessionViewModel">The dataset view model.</param> /// <param name="batchProcessingTaskMetadata">The batch processing task metadata.</param> public RunBatchProcessingTaskWindowViewModel(VisualizationContainer visualizationContainer, SessionViewModel sessionViewModel, BatchProcessingTaskMetadata batchProcessingTaskMetadata) { this.visualizationContainer = visualizationContainer; this.sessionViewModel = sessionViewModel; this.batchProcessingTaskMetadata = batchProcessingTaskMetadata; this.Name = batchProcessingTaskMetadata.Name; this.Description = batchProcessingTaskMetadata.Description; this.Target = sessionViewModel.Name; this.DataSize = TimeSpanFormatHelper.FormatTimeSpanApproximate(sessionViewModel.OriginatingTimeInterval.Span); this.Configuration = batchProcessingTaskMetadata.GetDefaultConfiguration(); }
/// <summary> /// Initializes a new instance of the <see cref="RunBatchProcessingTaskWindowViewModel"/> class. /// </summary> /// <param name="visualizationContainer">The visualization container.</param> /// <param name="datasetViewModel">The dataset view model.</param> /// <param name="batchProcessingTaskMetadata">The batch processing task metadata.</param> public RunBatchProcessingTaskWindowViewModel(VisualizationContainer visualizationContainer, DatasetViewModel datasetViewModel, BatchProcessingTaskMetadata batchProcessingTaskMetadata) { this.visualizationContainer = visualizationContainer; this.datasetViewModel = datasetViewModel; this.batchProcessingTaskMetadata = batchProcessingTaskMetadata; this.Name = batchProcessingTaskMetadata.Name; this.Description = batchProcessingTaskMetadata.Description; this.Target = datasetViewModel.Name; this.DataSize = TimeSpanFormatHelper.FormatTimeSpanApproximate( new TimeSpan(datasetViewModel.SessionViewModels.Sum(svm => svm.OriginatingTimeInterval.Span.Ticks))); this.Configuration = batchProcessingTaskMetadata.GetDefaultConfiguration(); }