private SeoDecorator CopySeo(SeoDecorator sourceSeo, int pageId) { var seoCopy = new SeoDecorator { ChangeFrequency = sourceSeo.ChangeFrequency, CreatedDate = sourceSeo.CreatedDate, Description = sourceSeo.Description, FileName = string.Format("Copy of {0}", sourceSeo.FileName), Keywords = sourceSeo.Keywords, LastModified = sourceSeo.LastModified, LinkType = sourceSeo.LinkType, LookFor = string.Format("{0}-copy", sourceSeo.LookFor), PageId = pageId, PortalId = sourceSeo.PortalId, Priority = sourceSeo.Priority, RobotsFollow = sourceSeo.RobotsFollow, RobotsIndex = sourceSeo.RobotsIndex, Title = string.Format("Copy of {0}", sourceSeo.Title) }; return seoCopy; }
/// <summary> /// Creates new SeoDecorator with generically comlpeted props /// </summary> /// <returns> /// New Seo Info /// </returns> private static SeoDecorator GenericallyComplete() { var genericProperties = new SeoDecorator(); genericProperties.ChangeFrequency = "monthly"; genericProperties.CreatedDate = DateTime.Now; genericProperties.LastModified = DateTime.Now; genericProperties.LinkType = 1; genericProperties.PortalId = 1; genericProperties.Priority = "0.5"; genericProperties.RobotsFollow = true; genericProperties.RobotsIndex = true; return genericProperties; }
private SeoDecorator AddSeo(SeoDecorator sourceSeo, int pageId) { var seoCopy = new SeoDecorator { ChangeFrequency = sourceSeo.ChangeFrequency, CreatedDate = sourceSeo.CreatedDate, Description = sourceSeo.Description, FileName = "New Page", Keywords = sourceSeo.Keywords, LastModified = sourceSeo.LastModified, LinkType = sourceSeo.LinkType, LookFor = "new-page", PageId = pageId, PortalId = sourceSeo.PortalId, Priority = sourceSeo.Priority, RobotsFollow = sourceSeo.RobotsFollow, RobotsIndex = sourceSeo.RobotsIndex, Title = "New Page" }; return seoCopy; }