• 大小: 1.67MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-04
  • 语言: 其他
  • 标签: 开源项目  

资源简介

MZBlog是基于NancyFx和mongoDB开发的,博客文章用Markdown编辑。名称就以作者中文名缩写作为前缀了:MZBlog。目前,该博客仅适用于个人博客或者团队博客,不适用于多人博客。代码分析推荐大家看看张善友同学写的博客文章《MzBlog分析》。博客的效果图如下:


标签:开源博客

资源截图

代码片段和文件信息

using System.Collections.Generic;
using System.Linq;

namespace MZBlog.Core
{
    public class CommandResult
    {
        private readonly List _errors = new List();

        public CommandResult()
        { }

        public static CommandResult SuccessResult
        {
            get
            {
                return new CommandResult();
            }
        }

        public CommandResult(string trrorMessage)
        {
            AddError(trrorMessage);
        }

        public bool Success
        {
            get { return !_errors.Any(); }
        }

        public void AddError(string trror)
        {
            _errors.Add(new CommandError(trror));
        }

        public string[] GetErrors()
        {
            return _errors.Select(t => t.Message).ToArray();
        }
    }

    public class CommandError
    {
        public virtual string Message { get; private set; }

        public CommandError(string message)
        {
            Message = message;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-05-15 08:51  MZBlog-master\
     文件         483  2018-05-15 08:51  MZBlog-master\.gitattributes
     文件        2192  2018-05-15 08:51  MZBlog-master\.gitignore
     文件        1076  2018-05-15 08:51  MZBlog-master\LICENSE
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Accounts\
     文件        1902  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Accounts\ChangePasswordCommandTests.cs
     文件        1377  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Accounts\LoginCommandTests.cs
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Extensions\
     文件         991  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Extensions\StringExtensionsTests.cs
     文件        5874  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\MZBlog.Core.Tests.csproj
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Properties\
     文件         508  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\Properties\AssemblyInfo.cs
     文件         502  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\iBoxDBBackedTest.cs
     文件         672  2018-05-15 08:51  MZBlog-master\MZBlog.Core.Tests\packages.config
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core\
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Cache\
     文件        2070  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Cache\ICache.cs
     文件        1943  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Cache\RuntimeCache.cs
     文件        1038  2018-05-15 08:51  MZBlog-master\MZBlog.Core\CommandResult.cs
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Accounts\
     文件        1140  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Accounts\ChangePasswordCommand.cs
     文件        1030  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Accounts\ChangeProfileCommand.cs
     文件        1889  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Accounts\LoginCommand.cs
     目录           0  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\
     文件         628  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\DeleteCommentCommand.cs
     文件         984  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\DeletePostCommand.cs
     文件        2477  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\EditPostCommand.cs
     文件        1626  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\NewCommentCommand.cs
     文件        2172  2018-05-15 08:51  MZBlog-master\MZBlog.Core\Commands\Posts\NewPostCommand.cs
............此处省略261个文件信息

评论

共有 条评论