小编Vis*_*loi的帖子

如何使用SSRS 2008 R2使用WCF服务

是否有任何好的教程可用于从SSRS中查询WCF服务?

我的WCF服务运行正常,但是当我尝试从SSRS查询它时,我得到合同不匹配异常.一些谷歌搜索建议在SSRS 2008 R2中查询WCF服务是可能的,但似乎没有任何好的文档可用.救命!

wcf ssrs-2008

10
推荐指数
1
解决办法
6096
查看次数

C#WinForms:识别拖放操作事件的类型

用例:用户需要能够将Outlook中的电子邮件项目拖放到WinForms(.Net 4)应用程序中的表单上.应用程序以.msg格式保存这些项目并将它们存储在预定位置.

问题是:我的代码不能很好地防止来自其他来源的拖放(例如,将jpeg从IE拖到窗体上会触发相同的事件).这是因为我无法确定拖动的项目是Outlook对象,还是拖动项目的来源.

有没有解决方法,我只能接受特定类型的拖放项目?这是我在DragDrop事件处理程序中的代码:

Outlook.Application outlook = new Outlook.Application();
Outlook.Selection sel = outlook.ActiveExplorer().Selection;

try
{    
    foreach (object item in sel)
    {
        if (item is Outlook.MailItem)
        {
            var mail = item as Outlook.MailItem;

            CopyMailItemToLocalTempDir(mail);

            txtComment.Text = "Email from " + mail.SenderName + " Regarding " + mail.Subject;
        }
    }
}
finally
{
    // This is hokey but it prevents Outlook from remembering previously selected items
    // - refer http://stackoverflow.com/questions/14090420/interop-outlook-doesnt-clear-selected-mails-at-drag-and-drop
    var folder = outlook.ActiveExplorer().CurrentFolder;
    outlook.ActiveExplorer().CurrentFolder = outlook.GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
    Thread.Sleep(50);
    outlook.ActiveExplorer().CurrentFolder …
Run Code Online (Sandbox Code Playgroud)

c# drag-and-drop winforms

9
推荐指数
1
解决办法
3216
查看次数

Visual Studio 2013自定义测试适配器:如何调试?

我正在编写一个自定义Visual Studio 测试适配器,并想知道:我该如何调试它?现在我正在遵循以下步骤:

  1. 在我的适配器代码中添加一些logger.SendMessage()日志行.
  2. 构建适配器
  3. 将上面步骤2中的dll复制到Test Extensions文件夹(Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions)
  4. 从控制台运行一些测试: vstest.console.exe dummy.project.with.tests.dll
  5. 查看日志输出

有没有办法在VS2013中调试我的测试适配器,因为它正在运行测试?

注意:我的研究在这篇文章中发现了一条评论,说使用Debugger.Launch() - 但我不知道如何激活它以实现我想要的.

c# vs-unit-testing-framework visual-studio-extensions

7
推荐指数
1
解决办法
1063
查看次数