摘要:
1.闭包(Closure)的概念: 内部函数中对enclosing作用域的变量进行引用 运行结果: 按照正常的理解,当执行完func函数后,in_func函数无法使用func函数作用域内的变量val,但是通过上面的代码,可以看到val添加到了in_func的__closure__属性中(in_fun 阅读全文
摘要:
HttpServer的GlobalConfiguration中创建: GlobalConfiguration中确定了第一个HttpMessageHandler消息管道: 首:DefaultServer HttpServer.Initialize方法完成对整个消息管道的创建 HttpMessageHa 阅读全文
摘要:
HttpConfiguration(ASP.NET Web API管道的配置是通过HttpConfiguration来完成) : 包括路由注册在内的对整个ASP.NET Web API管道的配置是通过HttpConfiguration来完成的。 如果采用Web Host寄宿模式,此HttpConfi 阅读全文
摘要:
1 lucene简介1.1 什么是luceneLucene是一个全文搜索框架,而不是应用产品。因此它并不像www.baidu.com 或者google Desktop那么拿来就能用,它只是提供了一种工具让你能实现这些产品。1.2 lucene能做什么要 回答这个问题,先要了解lucene的本质。实际 阅读全文
摘要:
MvcHandler.ProcessRequestInit()方法: 1.1获取控制器的名称string requiredString = this.RequestContext.RouteData.GetRequiredString("controller"); 1.2创建控制器类工厂 返回ICo 阅读全文
摘要:
MvcHandler.ProcessRequest() (1)获取Action执行结果:context2.Result ActionExecutedContext context2 = this.InvokeActionMethodWithFilters(controllerContext, fil 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Runtime.InteropServices; using System.Tex 阅读全文
摘要:
使用 ObservableCollection 列表控件主要是 ListBox、ListView、GridView 等。 为列表控件绑定数据不再是为 DataContext 属性赋值,应该使用列表控件自有的ItemsSource属性。 当列表数据元素由 ItemsSource绑定,就不能再动态操作( 阅读全文
摘要:
namespace LBI.DataBinding { /// <summary> /// 可用于自身或导航至 Frame 内部的空白页。 /// </summary> public sealed partial class DataBinding2 : Page { public MainData 阅读全文
摘要:
1.后台代码: 2.后台定义属性,前台XAML 中绑定: 3.XAML 中定义资源并应用(资源中自定义对象): 4.用元素值绑定: 阅读全文