Exemplo n.º 1
0
    private static void MapViewModelToView(Manifest manifest, Type viewModelType, Type viewType, VariantSet allVariants)
    {
        var variants = GetVariantsFromTypes(viewModelType, viewType, allVariants);
        var mapping  = new TypeToTypeMapping(viewModelType, viewType, variants);

        manifest.ViewModelsToViews.Add(mapping);
    }
    private static void MapModelToViewModel(Manifest manifest, Type modelType, Type viewModelType, VariantSet allVariants)
    {
        if (modelType == null)
        {
            return;
        }

        var variants = GetVariantsFromTypes(modelType, viewModelType, allVariants);
        var mapping  = new TypeToTypeMapping(modelType, viewModelType, variants);

        manifest.ModelsToViewModels.Add(mapping);
    }