惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

博客园 - jjxstudio

关于silverlight 前景的讨论,不吐不快 没有说说新的async ctp吗? 新blog地址 青春咖啡馆 2010 计划 axapta 断开的记录集 django 1.1 south 理解zope3 的适配器 准备放弃django openerp新的web-client openerp view design elements中的col和colspan - jjxstudio a中的this和element 怎样才算是一个好的windows forms 应用程序框架? 自定义django admin 之一 django admin search_fields 今天的折腾 杭州:一个python的工作机会 ironpython的下一个版本
上下文
jjxstudio · 2009-04-17 · via 博客园 - jjxstudio

两个ContextBoundObject 同步为REQUIRED的 A和B,当客户端依次调用时,会生成几个上下文,答案是2个

A a=new A();

a.Test(); //生成一个上下文

B b=new B();

 b.Test(); //生成一个新的上下温

 要使的B在A的上下文中,势必需要在A中创建B的实例才行

扩展方法,用起来像是类的实例,但方法作用范围并不在类的内部,而是在调用扩展方法中,所以,在这个例子中,它会创建一个新的上下文

  
            a.Test2(); //在a 的上下文中

            a.Test3(); //调用a的扩展方法Test3, 生成一个新的上下文

当在一个上下文对象中实例并调用一个非上下文绑定的对象时,其上下文即调用者的上下文,否则,无上下文