BetterCms.Module.Blog.Services.DefaultBlogMLService.MapViewModel C# (CSharp) Method

MapViewModel() private method

private MapViewModel ( BlogMLPost blogML, BetterCms.Module.Blog.Models.BlogPostImportResult modification = null, List unsavedUrls = null ) : BetterCms.Module.Blog.ViewModels.Blog.BlogPostViewModel
blogML BlogML.Xml.BlogMLPost
modification BetterCms.Module.Blog.Models.BlogPostImportResult
unsavedUrls List
return BetterCms.Module.Blog.ViewModels.Blog.BlogPostViewModel
        private BlogPostViewModel MapViewModel(BlogMLPost blogML, BlogPostImportResult modification = null, List<string> unsavedUrls = null)
        {
            var model = new BlogPostViewModel
                    {
                        Title = blogML.PostName ?? blogML.Title,
                        MetaTitle = blogML.Title,
                        IntroText = blogML.Excerpt != null ? blogML.Excerpt.UncodedText : null,
                        LiveFromDate = blogML.DateCreated.ToLocalTime().Date,
                        LiveToDate = null,
                        DesirableStatus = ContentStatus.Published,
                        Content = blogML.Content != null ? blogML.Content.UncodedText : null
                    };

            if (modification != null)
            {
                model.BlogUrl = modification.PageUrl;
                model.Title = modification.Title;
            }
            else
            {
                model.BlogUrl = blogService.CreateBlogPermalink(blogML.PostName ?? blogML.Title, unsavedUrls);
            }

            return model;
        }