您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->逐迹内容管理系统AspxNuke v2.0源码>>Portal/Domain/Plugin.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:逐迹内容管理系统AspxNuke v2.0源码


当前文件路径:AspxNuke/Portal/Domain/Plugin.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Collections; 4using System.Collections.Generic; 5using AspxNuke.Library.Text; 6 7namespace AspxNuke.Portal.Domain 8{ 9 /// <summary> 10 /// 插件 11 /// </summary> 12 public class Plugin 13 { 14 private int _id; 15 /// <summary> 16 /// 标识 17 /// </summary> 18 public virtual int Id 19 { 20 set { _id = value; } 21 get { return _id; } 22 } 23 24 private string _title; 25 /// <summary> 26 /// 标题 27 /// </summary> 28 public virtual string Title 29 { 30 set 31 { 32 if (value != null && ValidHelper.BytesSize(value) > 50) 33 { 34 throw new ArgumentOutOfRangeException("标题不能大于50字节!", value, value.ToString()); 35 } 36 _title = value; 37 } 38 get { return _title; } 39 } 40 41 private string _navigateUrl; 42 /// <summary> 43 /// 连接地址 44 /// </summary> 45 public virtual string NavigateUrl 46 { 47 set 48 { 49 if (value != null && ValidHelper.BytesSize(value) > 100) 50 { 51 throw new ArgumentOutOfRangeException("连接地址不能大于100字节!", value, value.ToString()); 52 } 53 _navigateUrl = value; 54 } 55 get { return _navigateUrl; } 56 } 57 58 private Plugin _parentNode; 59 /// <summary> 60 /// 当前节点的父节点。 61 /// </summary> 62 public virtual Plugin ParentNode 63 { 64 set 65 { 66 _parentNode = value; 67 } 68 get 69 { 70 return _parentNode; 71 } 72 } 73 74 /// <summary> 75 /// 节点的深度。 76 /// </summary> 77 public virtual int Depth 78 { 79 get { return ValuePath.Split('.').Length - 2; } 80 } 81 82 private string _valuePath; 83 /// <summary> 84 /// 从根节点到当前节点的路径。 85 /// </summary> 86 public virtual string ValuePath 87 { 88 get 89 { 90 if (string.IsNullOrEmpty(_valuePath)) 91 { 92 GetValuePath(this); 93 } 94 return _valuePath; 95 } 96 } 97 98 private void GetValuePath(Plugin p) 99 { 100 _valuePath = string.Concat(p.Id.ToString() + "." + _valuePath); 101 if (p.ParentNode != null) 102 { 103 GetValuePath(p.ParentNode); 104 } 105 } 106 107 private IList<Plugin> _childNodes = new List<Plugin>(); 108 /// <summary> 109 /// 当前节点的第一级子节点。 110 /// </summary> 111 public virtual IList<Plugin> ChildNodes 112 { 113 set { _childNodes = value; } 114 get { return _childNodes; } 115 } 116 117 /// <summary> 118 /// 子节点数 119 /// </summary> 120 public virtual int Childs 121 { 122 get { return _childNodes.Count; } 123 } 124 125 private string _target; 126 /// <summary> 127 /// 连接目标 128 /// </summary> 129 public virtual string Target 130 { 131 set 132 { 133 if (value != null && ValidHelper.BytesSize(value) > 30) 134 { 135 throw new ArgumentOutOfRangeException("连接目标不能大于30字节!", value, value.ToString()); 136 } 137 _target = value; 138 } 139 get { return _target; } 140 } 141 142 private string _remarks; 143 /// <summary> 144 /// 描述 145 /// </summary> 146 public virtual string Remarks 147 { 148 set 149 { 150 if (value != null && ValidHelper.BytesSize(value) > 250) 151 { 152 throw new ArgumentOutOfRangeException("描述不能大于250字节!", value, value.ToString()); 153 } 154 _remarks = value; 155 } 156 get { return _remarks; } 157 } 158 159 private int _orderBy; 160 /// <summary> 161 /// 排序 162 /// </summary> 163 public virtual int OrderBy 164 { 165 set { _orderBy = value; } 166 get { return _orderBy; } 167 } 168 169 private string _configure; 170 /// <summary> 171 /// 配置文件 172 /// </summary> 173 public virtual string Configure 174 { 175 set 176 { 177 if (value != null && ValidHelper.BytesSize(value) > 250) 178 { 179 throw new ArgumentOutOfRangeException("配置文件不能大于250字节!", value, value.ToString()); 180 } 181 _configure = value; 182 } 183 get { return _configure; } 184 } 185 186 private bool _isSystem; 187 /// <summary> 188 /// 是否系统 189 /// </summary> 190 public virtual bool IsSystem 191 { 192 set { _isSystem = value; } 193 get { return _isSystem; } 194 } 195 } 196} 197 198 199
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:逐迹内容管理系统AspxNuke v2.0源码

- 小胡商情网V2.0

- BugTrack51aspx汉化改造版V2.1.7

- 三层(工厂模式)简单留言板

- 51aspx日期控件演示及源码

- WO@BIZ第一季1.2版源码

- 56WA手机电影下载系统源码

- 明日多用户Blog系统源码

- Asp.net2.0用户注册控件使用实例

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号