带有托管可扩展性框架的Visual Studio 2010 [英] Visual Studio 2010 with Managed Extensiblity Framework

查看:92
本文介绍了带有托管可扩展性框架的Visual Studio 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究MEF(可扩展性框架),但是我不确定这是否是我需要的,并且可以帮助我简化我需要做的事情.

I've been looking into into MEF (Managed Extensibility Framework), but I am not entirely sure if it is something that I need and can help me accommplish what I need to do.

有人可以提供一个易于理解的MEF描述,提供良好的资源和教程(除MSDN之外)和/或知道它是否可以完成我在Visual Studio中要执行的任务?

Can someone provide an easy to understand description of MEF, provides good resources and tutorials (aside from MSDN), and/or know if it can do the task I am trying to do under Visual Studio?

我要执行的任务是每当用户选择文本字符串时,将文本字符串记录"到文本文件中.我还需要此功能以被动方式实时运行,而Visual Studio加载项不支持此功能,因为它们的行为是单击按钮以工作".

The task I am trying to do is to "log" a string of text to a text file whenever the user selects a string of text. I also need this functionality to run passively and real-time, which Visual Studio Add-in's do not support this functionality, as their behavior is "click the button to work".

推荐答案

请参见答案是是",这是可能的/受支持的.在样本/文档/演练中查找以下内容:

The answer is "yes", this is possible/supported. Look for the following in samples/documentation/walkthroughs:

IWpfTextViewCreationLister-用于检测何时创建编辑器实例.
ITextView.Selection-选择对象
- 凸起每当(跟踪插入符虽然不是为空选择)的选择变化

IWpfTextViewCreationLister - for detecting when editor instances are created.
ITextView.Selection - the selection object
ITextSelection.SelectionChanged - raised whenever the selection changes (though not for the empty-selection tracking the caret)

这篇关于带有托管可扩展性框架的Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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