我们怎么知道某个方法正在执行某个时间点 [英] How could we know that a method is executing a certain point of time

查看:87
本文介绍了我们怎么知道某个方法正在执行某个时间点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要一个场景,其中我需要在列表视图中显示所有方法,而执行程序的要点是,我需要在列表视图中显示该方法在完成后正在执行并带有一些刻度线.考虑方法需要一些时间.


感谢adv ..

Hi
I need a scenario where I need to show all methods in a list view and a the point of executing the program Ii need to show that in listview that method is executing with some tick mark after completion. considering method taking some time.


Thanks in adv..

推荐答案

您可以使用Microsoft提供的Policy Injection Application Block并为您的方法定义一些策略,以便对该方法进行前后处理.在前后处理程序中,您可以引发事件以使用所需信息更新列表视图.

有关策略注入应用程序块的更多详细信息,请检查
http://msdn.microsoft.com/en-us/library/ff648328 (v = PandP.10).aspx [
You can use Policy Injection Application Block provided by Microsoft and defined some policies over you methods for pre and post handling of the method. In the pre and post handler you can raise events to updated the listview with desired information.

For more details on Policy Injection Application Block check
http://msdn.microsoft.com/en-us/library/ff648328(v=PandP.10).aspx[^]


您可能希望通过代码访问调用堆栈.
请参见
此处.
You might want to access the call stack through code.
See here.


这篇关于我们怎么知道某个方法正在执行某个时间点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆