public ISectionService <ISectionView> ResolveNonGeneric(ISectionView sectionViewModel) { var method = GetType() .GetMethod(nameof(Resolve), BindingFlags.Public | BindingFlags.Instance) .MakeGenericMethod(sectionViewModel.GetType()); return((ISectionService <ISectionView>)method.Invoke(this, new[] { sectionViewModel })); }
public Section(ISectionView sectionView) { SectionContent = sectionView.ThrowIfNull(nameof(sectionView)); _viewModel = sectionView.ViewModel.ThrowIfNull(nameof(sectionView.ViewModel)); Title = sectionView.Title; }