Blog data used for blogs management in admin area.
        public static JsonBlog CreateJsonBlog(Blog b)
        {
            var jb = new JsonBlog
            {
                Id = b.Id,
                Name = b.Name,
                StorageContainerName = b.StorageContainerName,
                Hostname = b.Hostname,
                IsAnyTextBeforeHostnameAccepted = b.IsAnyTextBeforeHostnameAccepted,
                VirtualPath = b.VirtualPath,
                IsActive = b.IsActive,
                IsPrimary = b.IsPrimary,
                RelativeWebRoot = b.RelativeWebRoot,
                AbsoluteWebRoot = b.AbsoluteWebRoot,
                PhysicalStorageLocation = HostingEnvironment.MapPath(b.StorageLocation),
                CanUserEdit = b.CanUserEdit,
                CanUserDelete = b.CanUserDelete
            };

            return jb;
        }
Exemple #2
0
        public static JsonBlog CreateJsonBlog(Blog b)
        {
            var jb = new JsonBlog
            {
                Id   = b.Id,
                Name = b.Name,
                StorageContainerName            = b.StorageContainerName,
                Hostname                        = b.Hostname,
                IsAnyTextBeforeHostnameAccepted = b.IsAnyTextBeforeHostnameAccepted,
                VirtualPath                     = b.VirtualPath,
                IsActive                        = b.IsActive,
                IsPrimary                       = b.IsPrimary,
                RelativeWebRoot                 = b.RelativeWebRoot,
                AbsoluteWebRoot                 = b.AbsoluteWebRoot,
                PhysicalStorageLocation         = HostingEnvironment.MapPath(b.StorageLocation),
                CanUserEdit                     = b.CanUserEdit,
                CanUserDelete                   = b.CanUserDelete
            };

            return(jb);
        }