摘要: 1. While it is hanging I take a memory dump of the process usingadplus -p <PID for the IExplore.exe process> -hang2. I open up the dump in windbg and set the symbol path.sympath SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols .reload3. I load up sos.dll from the silverlight direct阅读全文
posted @ 2012-04-12 16:27 牟向阳 阅读(9) 评论(2) 编辑
摘要: Silverlight中实现同步调用Service,核心是用到了MS的Interlocked.Increment.Interlocked.Increment是做什么事情的?如果有两个Thread ,分别记作threadA,threadB。1:threadA将Value从存储空间取出,为0;2:threadB将Value从存储空间取出,为0;3:threadA将取出来的值和1作加法,并且将和放回Value的空间覆盖掉原值。加法结束,Value=1。4:threadB将取出来的值和1作加法,并且将和放回Value的空间覆盖掉原值。加法结束,Value=1。最后Value =1 ,而正确应该是2;这阅读全文
posted @ 2011-09-14 10:56 牟向阳 阅读(366) 评论(8) 编辑
摘要: 项目开发中遇到一个要求,需要将ComboBox右侧中的小三角箭头给去掉,通过Blend工具“编辑ComboBox的模板副本”得知,这是一个名为"BtnArrow"的Path。但是在CS代码中,是无法引用到这个控件的。解决办法:重新定义一个类,继承自ComboBox,然后重写OnApplyTemplate方法,代码如下01using System.Windows;02using System.Windows.Controls;03using System.Windows.Shapes;0405namespace ContentTemplateTest06{07public c阅读全文
posted @ 2011-09-07 09:49 牟向阳 阅读(25) 评论(0) 编辑
摘要: WebClient或HttpRequest等Silverlight访问服务端的手段,仅提供异步方法,所以,了解Silverlight端的多线程技术,显得十分重要。1. 跨UI线程首先,我们要了解的是Dispatcher,Winform多线程编程时代,很多人肯定遇到过,当子线程访问UI线程的时候,MS处于规则考虑,会拒绝访问。那我们必须基于Control.Invoke、SynchronizationContext或BackgroudWorker来调用。现在,Silverlight时代,怎么办呢?这就不卖关子了,用 Dispatcher.BeginInvoke 就可以了。当然,要Dispatche阅读全文
posted @ 2011-06-07 21:48 牟向阳 阅读(321) 评论(1) 编辑
摘要: 本计划整理一下,平时开发使用的一些Silverlight工具的集合。偶然间发现已经有大叔,已经帮忙整理好了。都是很实用的一些东东,Silverlight开发肯定用的找。大家有好的sl武器,也可以Share一下。来源:SmithStevenBlogAs we approach the launch of Silverlight 4 and today the 2010 Winter Olympics begin (which are streaming via Silverlight!) I thought I’d post about some Silverlight Tools you ma阅读全文
posted @ 2011-05-11 13:58 牟向阳 阅读(71) 评论(1) 编辑
摘要: 1. 需要Mapping的Xml结构<?xml version="1.0" encoding="utf-8"?><Requestes> <Request name="RequestA" formname="LanguageUI" serviceurl="http://MyComputer/LanguageService" httpmethod="POST" targetui="Settings->LanuageSetting&qu阅读全文
posted @ 2011-05-06 16:55 牟向阳 阅读(73) 评论(0) 编辑
摘要: Emit 和 CodeDom 都是用来动态创建类型,并利用反射执行的东东~~~~ 这两个都是 .NET Framework 中比较有深度的内容。有关 CodeDom,雨痕已经写过好几篇了,此处不再详述。CodeDom 利用 C#/VB.NET 等编译引擎进行动态编译,而 Emit 则直接使用 IL,从编程方便的角度来说 CodeDom 更方便一点。当然 CodeDom 要花费一定的编译时间,而一旦载入则和 Emit 或静态编译程序集没有什么区别。Emit 被很多 AOP/ORM 组件所使用,除了 ILGenerator 外,和 CodeDom 的编程习惯很相似。接下来雨痕会写几篇 Emit 的阅读全文
posted @ 2011-01-30 10:42 牟向阳 阅读(180) 评论(1) 编辑
摘要: public class MySerializerFormatAttribute : Attribute, IOperationBehavior { public void AddBindingParameters(OperationDescription description, BindingParameterCollection parameters) { } public void Validate(OperationDescription description) { } private static void ReplaceBehavior(OperationDescription阅读全文
posted @ 2011-01-20 16:53 牟向阳 阅读(70) 评论(1) 编辑
摘要: SET SHOWPLAN_ALL OFF显示所有的查询计划SET SHOWPLAN_TEXT OFF显示查询计划SET STATISTICS IO OFF显示IO操作SET STATISTICS TIME OFF显示耗时阅读全文
posted @ 2010-09-21 13:16 牟向阳 阅读(25) 评论(0) 编辑
摘要: 学习Silverlight企业级开发之前,一定先要把下面这些东东搞懂。不然会对你以后的开发,造成很大障碍。阅读全文
posted @ 2010-07-06 13:33 牟向阳 阅读(261) 评论(0) 编辑