Exemple #1
0
        public OperationViewModelsSource ConvertUsing(OperationViewModelFactory operationViewModelFactory)
        {
            var operationViewModels = OperationViewModelsSource
                                      .CreateOperationViewModels(operationViewModelFactory, _operations);

            return(operationViewModels);
        }
        public static OperationViewModelsSource CreateOperationViewModels(
            OperationViewModelFactory operationViewModelFactory,
            IEnumerable <OperationEntry> operationEntries)
        {
            var operationViewModels = new OperationViewModelsSource(
                operationEntries.Select(
                    operationEntry => operationEntry.ToOperationViewModel(operationViewModelFactory)).ToList());

            operationViewModels.Register();
            operationViewModels.ResolveDependencies();

            return(operationViewModels);
        }
 public void Initialize(OperationViewModelFactory operationViewModelFactory)
 {
     _testComponentInstance.CreateOperations(this);
     _testComponentInstance.PopulateOperations(this);
     _operationViewModelsSource = _operationEntries.ConvertUsing(operationViewModelFactory);
 }