예제 #1
0
    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 }));
    }
예제 #2
0
 public Section(ISectionView sectionView)
 {
     SectionContent = sectionView.ThrowIfNull(nameof(sectionView));
     _viewModel     = sectionView.ViewModel.ThrowIfNull(nameof(sectionView.ViewModel));
     Title          = sectionView.Title;
 }