This commit is contained in:
Tommy Parnell
2019-02-08 00:33:57 -05:00
parent c3a583a33b
commit e539263aa4
4 changed files with 6 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ namespace TerribleDev.Blog.Web.Factories
return accum.SetItem(highestPage, current.Add(item));
}).ToImmutableDictionary();
var syndicationPosts = posts.Select(i => i.ToSyndicationItem()).ToImmutableList();
var postsToPosition = posts.Select((item, index) => (item, index)).ToImmutableDictionary(i => i.item, i => i.index);
return new PostCache()
{
PostsAsLists = posts,

View File

@@ -18,5 +18,7 @@ namespace TerribleDev.Blog.Web.Models
public string SummaryPlainShort { get; set; }
public IList<string> tags { get; set; }
public IList<string> Images { get; set;}
}
}

View File

@@ -10,6 +10,7 @@ namespace TerribleDev.Blog.Web.Models
public ImmutableDictionary<string, IPost> UrlToPost { get; set; }
public ImmutableDictionary<int, ImmutableList<IPost>> PostsByPage { get; set; }
public ImmutableList<SyndicationItem> PostsAsSyndication { get; set; }
public ImmutableDictionary<IPost, int> PostToPosition { get; set; }
}
}

View File

@@ -7,6 +7,7 @@
<UserSecretsId>9a1f51b6-f4d9-4df7-a0af-e345176e9927</UserSecretsId>
<ApplicationInsightsResourceId>/subscriptions/088a81c7-d703-41c9-a1d0-476bce11df60/resourcegroups/WebResourceGroup/providers/microsoft.insights/components/tparnellblognew</ApplicationInsightsResourceId>
<ApplicationInsightsAnnotationResourceId>/subscriptions/088a81c7-d703-41c9-a1d0-476bce11df60/resourcegroups/WebResourceGroup/providers/microsoft.insights/components/tparnellblognew</ApplicationInsightsAnnotationResourceId>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>