* Web.config:

* Web.csproj:
* Web.config:
* Blog.cs:
* Index.aspx:
* BBCodeHelper.cs:
* Comment.cs:
* yavscModel.csproj:
* BlogEntry.cs:
* UserPost.aspx:
* UserPosts.aspx:
* Estimate.cs:
* RemovePost.aspx:
* TitleNotFound.aspx:
* BlogProvider.cs:
* AccountController.cs:
* BlogsApiController.cs:
* WorkFlowController.cs:
* BlogEditEntryModel.cs:
* FindBlogEntryFlags.cs:
* BlogEntryCollection.cs:
* Comment.cs:
* BlogEditCommentModel.cs:
* NpgsqlBlogProvider.cs:
* NpgsqlContentProvider.cs:
* BlogEntry.cs:
* NpgsqlBlogProvider.csproj:
* NpgsqlMembershipProvider.cs:
* FindBlogEntryFlags.cs:
* BlogEntryCollection.cs: 

* BlogHelper.cs: refactoring: moving code from NpgsqlBlogProvider to
  yavscModel.Blogs


* BlogManager.cs: NpgsqlBlogProvider/BlogHelper.cs


* BlogsController.cs: a successfull confirmed removal

* Blog.cs: refactoring
This commit is contained in:
Paul Schneider
2014-09-23 01:43:11 +02:00
parent bba917dcc0
commit 9fc7f82531
29 changed files with 213 additions and 114 deletions

View File

@ -3,6 +3,7 @@ using System.Configuration;
using System.Reflection;
using System.Collections.Specialized;
using Npgsql.Web.Blog.Configuration;
using yavscModel.Blogs;
namespace Npgsql.Web.Blog
{

View File

@ -1,5 +1,6 @@
using System;
using Npgsql.Web.Blog.DataModel;
using yavscModel.Blogs;
namespace Npgsql.Web.Blog
{

View File

@ -2,9 +2,8 @@ using System;
using System.Configuration;
using System.Configuration.Provider;
using System.Collections.Generic;
using Npgsql.Web.Blog.DataModel;
namespace Npgsql.Web.Blog
namespace yavscModel.Blogs
{
public abstract class BlogProvider: ProviderBase
{

View File

@ -1,26 +0,0 @@
using System;
using System.Configuration;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
namespace Npgsql.Web.Blog.DataModel
{
public class Blog
{
string title;
[StringValidator(MaxLength=512)]
[Required]
[DisplayName("Titre")]
public string Title {
get {
return title;
}
set {
title = value;
}
}
}
}

View File

@ -1,91 +0,0 @@
using System;
using System.Configuration;
using System.Configuration.Provider;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Npgsql.Web.Blog.DataModel
{
public class BlogEntry
{
long id;
[DisplayName("Identifiant numérique de billet")]
public long Id {
get {
return id;
}
set {
id = value;
}
}
string title;
[StringValidator(MaxLength=512)]
[DisplayName("Titre du billet")]
[StringLength(512)]
[RegularExpression("^[^:%&?]*$",ErrorMessage = "Les caratères suivants sont invalides pour un titre: :%&?")]
[Required(ErrorMessage = "S'il vous plait, saisissez un titre")]
public string Title {
get {
return title;
}
set {
title = value;
}
}
string content;
[DisplayName("Corps du billet")]
[Required(ErrorMessage = "S'il vous plait, saisissez un texte.")]
public string Content {
get {
return content;
}
set {
content = value;
}
}
string userName;
[StringValidator(MaxLength=255)]
[DisplayName("Nom de l'auteur")]
public string UserName {
get {
return userName;
}
set {
userName = value;
}
}
public DateTime posted;
[DisplayName("Date de creation")]
public DateTime Posted {
get {
return posted;
}
set {
posted = value;
}
}
public DateTime modified;
[DisplayName("Date de modification")]
public DateTime Modified {
get {
return modified;
}
set {
modified = value;
}
}
public bool Visible { get; set ; }
public string [] Tags { get; set ; }
}
}

View File

@ -1,12 +0,0 @@
using System;
using System.Configuration;
using System.Configuration.Provider;
using System.Collections.Generic;
namespace Npgsql.Web.Blog.DataModel
{
public class BlogEntryCollection : List<BlogEntry>
{
}
}

View File

@ -1,76 +0,0 @@
using System;
using System.Configuration;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Npgsql.Web.Blog.DataModel
{
public class Comment
{
long id;
[DisplayName("Identifiant numérique de commentaire")]
public long Id {
get {
return id;
}
set {
id = value;
}
}
long postid;
[DisplayName("Identifiant numérique du billet commenté")]
public long PostId {
get {
return postid;
}
set {
postid = value;
}
}
/// <summary>
/// Gets or sets the author of this comment.
/// </summary>
/// <value>From.</value>
public string From { get; set; }
string content;
[DisplayName("Contenu")]
[Required(ErrorMessage = "S'il vous plait, saisissez un contenu")]
public string CommentText {
get {
return content;
}
set {
content = value;
}
}
public DateTime posted;
[DisplayName("Date de creation")]
public DateTime Posted {
get {
return posted;
}
set {
posted = value;
}
}
public DateTime modified;
[DisplayName("Date de modification")]
public DateTime Modified {
get {
return modified;
}
set {
modified = value;
}
}
public bool Visible { get; set ; }
}
}

View File

@ -1,16 +0,0 @@
using System;
using System.Configuration;
using System.Configuration.Provider;
using System.Collections.Generic;
namespace Npgsql.Web.Blog.DataModel
{
public enum FindBlogEntryFlags : byte {
MatchTitle = 1,
MatchContent = 2,
MatchUserName = 4,
MatchInvisible = 8
}
}

View File

@ -2,8 +2,8 @@ using System;
using System.Configuration;
using System.Configuration.Provider;
using Npgsql;
using Npgsql.Web.Blog.DataModel;
using System.Collections.Generic;
using yavscModel.Blogs;
namespace Npgsql.Web.Blog
{

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C6E9E91B-97D3-48D9-8AA7-05356929E162}</ProjectGuid>
<OutputType>Library</OutputType>
@ -33,19 +33,13 @@
<Compile Include="Configuration\BlogProviderConfigurationElement.cs" />
<Compile Include="Configuration\BlogProvidersConfigurationCollection.cs" />
<Compile Include="Configuration\BlogProvidersConfigurationSection.cs" />
<Compile Include="DataModel\BlogEntry.cs" />
<Compile Include="DataModel\BlogEntryCollection.cs" />
<Compile Include="BlogHelper.cs" />
<Compile Include="BlogManager.cs" />
<Compile Include="BlogProvider.cs" />
<Compile Include="NpgsqlBlogProvider.cs" />
<Compile Include="DataModel\FindBlogEntryFlags.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="DataModel\Blog.cs" />
<Compile Include="DataModel\Comment.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="DataModel\" />
<Folder Include="Sql\" />
</ItemGroup>
<ItemGroup>
@ -67,4 +61,10 @@
<ItemGroup>
<None Include="Sql\BlogTable.sql" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\yavscModel\yavscModel.csproj">
<Project>{68F5B80A-616E-4C3C-91A0-828AA40000BD}</Project>
<Name>yavscModel</Name>
</ProjectReference>
</ItemGroup>
</Project>