📄 article.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace Plug.Article.Entity
{
/// <summary>
/// 采集文章信息,部分属性可留空。标题与地址如为空则默认赋值时引发异常
/// </summary>
[Serializable]
public class Article
{
private string category;
/// <summary>
/// 文章类别
/// </summary>
public string Category
{
get { return category; }
set { category = value; }
}
private string url;
/// <summary>
/// 文章连接地址
/// </summary>
public string Url
{
get
{
return url;
}
set
{
if (value == "" || value.Length <= 0)
{
throw new ApplicationException("文章的连接地址不能为空!");
}
url = value;
}
}
private string title;
/// <summary>
/// 文章标题
/// </summary>
public string Title
{
get
{
return title;
}
set
{
if (value == "" || value.Length <= 0)
{
throw new ApplicationException("文章的标题不能为空!");
}
title = value;
}
}
private int views;
/// <summary>
/// 文章浏览次数
/// </summary>
public int Views
{
get
{
return views;
}
set
{
views = value;
}
}
private int replys;
/// <summary>
/// 文章评论次数
/// </summary>
public int Replys
{
get
{
return replys;
}
set
{
replys = value;
}
}
private string datatime;
/// <summary>
/// 文章发布日期
/// </summary>
public string Datatime
{
get
{
return datatime;
}
set
{
datatime = value;
}
}
private string author;
/// <summary>
/// 文章作者
/// </summary>
public string Author
{
get
{
return author;
}
set
{
author = value;
}
}
private string site;
/// <summary>
/// 文章作者网站、文章采集网站
/// </summary>
public string Site
{
get
{
return site;
}
set
{
site = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -