예제 #1
0
 /// <summary>
 /// Maps a <paramref name="portal" /> to a <see cref="PageLayersViewModel" /> object.
 /// </summary>
 /// <param name="portal">The model to map.</param>
 /// <returns>
 /// The viewModel object.
 /// </returns>
 public static PageLayersViewModel ToPageLayersViewModel(PortalItem portal, PortalCompilerResult portalCompilerResult)
 {
     return(portal == null || portalCompilerResult == null ? null : new PageLayersViewModel
     {
         Portal = ToPortalViewModel(portal),
         MasterPage = ToPageViewModel(portalCompilerResult.MasterPage),
         ContentPage = ToPageViewModel(portalCompilerResult.ContentPage)
     });
 }
예제 #2
0
 /// <summary>
 /// Maps a <paramref name="portal" /> to a <see cref="PageLayersDto" /> object.
 /// </summary>
 /// <param name="portal">The model to map.</param>
 /// <returns>
 /// The viewModel object.
 /// </returns>
 public static PageLayersDto ToPageLayersDto(PortalItem portal, PortalCompilerResult portalCompilerResult)
 {
     return(portal == null || portalCompilerResult == null ? null : new PageLayersDto
     {
         Portal = ToPortalDto(portal),
         MasterPage = ToPageDto(portalCompilerResult.MasterPage),
         ContentPage = ToPageDto(portalCompilerResult.ContentPage)
     });
 }