bug fixes

* Makefile: my deploy config

* NpgsqlMembershipProvider.cs: Fixes a Bug introduced by Npgsql driver
  upgrade

* ResultPages.cs: .

* style.css: other colors

* BlogsController.cs: code cleaning

* GoogleController.cs: refactoring

* ErrorHtmlFormatter.cs: MarkdownDeep calls now come from yavscModel

* YavscHelpers.cs: xmldoc

* Index.aspx: code formatting

* UserPosts.aspx: nothing to note

* Web.csproj: MarkdownHelper has gone to the yavscModel project

* MarkdownHelper.cs:
* BlogEntryCollection.cs: refactoring + extract an intro from Markdown
  for PostInfo*

* YavscModel.csproj: MarkdownHelper integration
This commit is contained in:
Paul Schneider 2015-10-04 03:02:17 +02:00
commit ce1689df7b
19 changed files with 193 additions and 129 deletions

View file

@ -56,51 +56,50 @@ namespace Yavsc.Model.Blogs
{
return this.Where (x => x.Title == title).ToArray ();
}
/// <summary>
/// Base post info.
/// </summary>
public class BasePostInfo {
/// <summary>
/// The identifier.
/// </summary>
public long Id;
/// <summary>
/// The posted.
/// </summary>
public DateTime Posted;
/// <summary>
/// The modified.
/// </summary>
public DateTime Modified;
/// <summary>
/// The intro.
/// </summary>
public string Intro;
}
/// <summary>
/// Post info.
/// </summary>
public struct PostInfoByTitle {
public class PostInfoByTitle : BasePostInfo {
/// <summary>
/// The name of the user.
/// </summary>
public string Author;
/// <summary>
/// The identifier.
/// </summary>
public long Id;
/// <summary>
/// The posted.
/// </summary>
public DateTime Posted;
/// <summary>
/// The modified.
/// </summary>
public DateTime Modified;
}
/// <summary>
/// Post info by user.
/// </summary>
public struct PostInfoByUser {
public class PostInfoByUser : BasePostInfo {
/// <summary>
/// The name of the user.
/// </summary>
public string Title;
/// <summary>
/// The identifier.
/// </summary>
public long Id;
/// <summary>
/// The posted.
/// </summary>
public DateTime Posted;
/// <summary>
/// The modified.
/// </summary>
public DateTime Modified;
}
/// <summary>
@ -108,11 +107,12 @@ namespace Yavsc.Model.Blogs
/// </summary>
public IEnumerable<IGrouping<string,PostInfoByTitle>> GroupByTitle()
{
bool truncated;
return from be in this
orderby be.Posted descending
group
new PostInfoByTitle { Author=be.Author, Id=be.Id,
Posted=be.Posted, Modified=be.Modified }
Posted=be.Posted, Modified=be.Modified, Intro = MarkdownHelper.MarkdownIntro(be.Content, out truncated) }
by be.Title
into titlegroup
select titlegroup;
@ -123,11 +123,12 @@ namespace Yavsc.Model.Blogs
/// <returns>The by user.</returns>
public IEnumerable<IGrouping<string,PostInfoByUser>> GroupByUser()
{
bool truncated;
return from be in this
orderby be.Posted descending
group
new PostInfoByUser { Title=be.Title, Id=be.Id,
Posted=be.Posted, Modified=be.Modified }
Posted=be.Posted, Modified=be.Modified, Intro = MarkdownHelper.MarkdownIntro(be.Content, out truncated) }
by be.Author
into usergroup
select usergroup;