BlogEngine.Core/BusinessBase.cs
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#region Using
using System;
using System.Text;
using System.ComponentModel;
using System.Collections.Specialized;
using System.Globalization;
using System.Threading;
#endregion
namespace BlogEngine.Core
{
/// <summary>
/// This is the base class from which most business objects will be derived.
/// To create a business object, inherit from this class.
/// </summary>
/// <typeparam name="TYPE">The type of the derived class.</typeparam>
/// <typeparam name="KEY">The type of the Id property.</typeparam>
[Serializable]
public abstract class BusinessBase<TYPE, KEY> : IDataErrorInfo, INotifyPropertyChanged, IChangeTracking, IDisposable where TYPE : BusinessBase<TYPE, KEY>, new()
{
#region Properties
private KEY _Id;
/// <summary>
/// Gets the unique Identification of the object.
/// </summary>
public KEY Id
{
get { return _Id; }
set { _Id = value; }
}
private DateTime _DateCreated = DateTime.MinValue;
/// <summary>
/// The date on which the instance was created.
/// </summary>
public DateTime DateCreated
{
get
{
if (_DateCreated == DateTime.MinValue)
return _DateCreated;
return _DateCreated.AddHours(BlogSettings.Instance.Timezone);
}
set
{
if (_DateCreated != value) MarkChanged("DateCreated");
_DateCreated = value;
}
}
private DateTime _DateModified = DateTime.MinValue;
/// <summary>
/// The date on which the instance was modified.
/// </summary>
public DateTime DateModified
后面还有 509 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
