persistentobject.cs

来自「基于DotNet的开源工作流引擎」· CS 代码 · 共 32 行

CS
32
字号
using System;

namespace NetBpm.Util.DB
{
	//@portme http://www.codeproject.com/csharp/objserial.asp
//#Serializable#
	public class PersistentObject //: System.Runtime.Serialization.ISerializable
	{
		protected internal Int64 _id;

		public Int64 Id
		{
			get { return _id; }
			set { this._id = value; }
		}

		// toString
		public override String ToString()
		{
			String className = this.GetType().FullName;
			int to = className.Length;
			if (className.EndsWith("Impl"))
			{
				to = to - 4;
			}
			int from = className.LastIndexOf('.') + 1;
			className = className.Substring(from, to - from);
			return className + "[" + _id + "]";
		}

	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?