摘要: private static readonly Object ThisLock = new object();private static readonly AutoResetEvent AutoReset = new AutoResetEvent(false);private static int... 阅读全文
posted @ 2015-04-20 10:21 hot's 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 写得比较啰嗦,自己记载备用 1publicclassXmlFunction2{3privatestaticXDocument_doc=newXDocument();4publicstaticstringFilePath="mydata.xml";5publicXmlFunction()6{7_doc... 阅读全文
posted @ 2015-03-27 16:45 hot's 阅读(287) 评论(3) 推荐(1) 编辑
摘要: 反射实体T,非datetime字段反射获取表达式树publicstaticExpression>GetSearchExpression(stringSearchString){Expression>filter=null;if(string.IsNullOrEmpty(SearchString))returnnull;varleft=Expression.Parameter(typeof(T),"m");Expressionexpression=Expression.Constant(false);Tobj=default(T);vartype=typeof(T 阅读全文
posted @ 2014-02-24 17:13 hot's 阅读(725) 评论(1) 推荐(0) 编辑
摘要: 设计方向:1.摒弃SiteMap,避免在容易书写错误的sitemap中书写,导航在controller和action上打标签生成。2.controller统一继承basecontroller,在basecontroller上统一权限拦截。3.使用缓存保存权限列表,避免反复读取数据库。4.使用Elinq作为ORM工具5.使用页面部分试图权限一.获取权限视图缓存列表 //////获取权限视图缓存列表//////publicstaticListGetAuthCache(){ListviewRoleGroup;stringkey="ViewAuthList";if(HttpRunt 阅读全文
posted @ 2013-09-14 16:33 hot's 阅读(1089) 评论(4) 推荐(0) 编辑