Exemple #1
0
        public EditUseCaseWindowViewModel()
        {
            UseCaseContext = new UseCaseContext();
            InitializeMapper();
            InitializeCommands();

            AddSetterPropertiesTrigger(new DD.Lab.Wpf.Models.PropertiesTrigger(() =>
            {
                SentenceCollectionInputData = new UseCaseSentenceCollectionManagerInputData()
                {
                    ParentInputParameters = ContentView.Parameters
                                            .Where(k => k.Direction == MethodParameter.ParameterDirection.Input)
                                            .Select(k => new MethodParameterReferenceViewModel(k))
                                            .ToList(),
                    ParentOutputParameters = ContentView.Parameters
                                             .Where(k => k.Direction == MethodParameter.ParameterDirection.Output)
                                             .Select(k => new MethodParameterReferenceViewModel(k))
                                             .ToList(),
                    SentenceCollection = ContentView.SentenceCollection,
                    GenericManager     = GenericManager,
                    UseCaseContext     = UseCaseContext,
                    Mapper             = Mapper,
                };
            }, nameof(ContentView), nameof(GenericManager)));
        }
Exemple #2
0
 private void UpdatedUseCaseSentenceCollectionManagerInputData(UseCaseSentenceCollectionManagerInputData data)
 {
     if (Mapper == null)
     {
         Mapper = data.Mapper;
     }
     SentenceCollection = data.SentenceCollection;
     UseCaseContext     = data.UseCaseContext;
 }
Exemple #3
0
 private void SetUseCaseSentenceCollectionManagerInputData(UseCaseSentenceCollectionManagerInputData data)
 {
     ViewModel.UseCaseSentenceCollectionManagerInputData = data;
 }