小编the*_*gis的帖子

FX COP无法解析类型引用:System.Windows.Input.ICommand

仅在我们的buildagent上使用FXCOP时遇到麻烦,并且只能通过命令行工具.

我正在使用Caliburn.Mirco框架并添加了自定义触发器,因此我可以使用删除按钮.此类实现ICommand接口

错误是:"读取模块'MyProject.UI'时遇到以下错误:无法解析类型引用:[System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089] System.Windows.Input.ICommand"

完整的错误日志

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="C:\BuildAgent\work\program files\microsoft fxcop 1.36\Xml\FxCopReport.xsl"?>
<FxCopReport Version="10.0">
 <Localized>
  <String Key="Category">Category</String>
  <String Key="Certainty">Certainty</String>
  <String Key="CollapseAll">Collapse All</String>
  <String Key="CheckId">Check Id</String>
  <String Key="Error">Error</String>
  <String Key="Errors">error(s)</String>
  <String Key="ExpandAll">Expand All</String>
  <String Key="Help">Help</String>
  <String Key="Line">Line</String>
  <String Key="Messages">message(s)</String>
  <String Key="LocationNotStoredInPdb">[Location not stored in Pdb]</String>
  <String Key="Project">Project</String>
  <String Key="Resolution">Resolution</String>
  <String Key="Rule">Rule</String>
  <String Key="RuleFile">Rule File</String>
  <String Key="RuleDescription">Rule Description</String>
  <String Key="Source">Source</String>
  <String Key="Status">Status</String>
  <String Key="Target">Target</String>
  <String Key="Warning">Warning</String>
  <String Key="Warnings">warning(s)</String>
  <String Key="ReportTitle">Code Analysis Report</String>
 </Localized>
 <Exceptions> …
Run Code Online (Sandbox Code Playgroud)

c# wpf teamcity fxcop caliburn.micro

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

使用 InMemoryTestFixture 测试大众运输消费者

想要围绕 MassTransit 消费者设计我的测试,我可以在其中向消费者发送包含各种内容的消息。根据消息的内容,消费者将“工作”并中继消息。

我遇到的问题是,在单独的测试装置中运行其中两个测试时,似乎有一些干扰了第二个测试。但是单独运行每个测试都成功运行。

在查看了 MassTransit 测试项目后,我想出了一些示例测试代码来演示我遇到的问题。

[TestFixture]
public class PingPongMessageTestFixture : InMemoryTestFixture
{
    private PongConsumer _pongConsumer;
    protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
    {
        _received = Handled<IPongMessage>(configurator);
    }

    protected override void PreCreateBus(IInMemoryBusFactoryConfigurator configurator)
    {
        var _pingConsumer = new PingConsumer();
        _pongConsumer = new PongConsumer();
        configurator.ReceiveEndpoint("test_ping_queue", e =>
        {
            e.Consumer(() => _pingConsumer);
        });

        configurator.ReceiveEndpoint("test_pong_queue", e =>
        {
            e.Consumer(() => _pongConsumer);
        });
    }

    Task<ConsumeContext<IPongMessage>> _received;

    [Test]
    public async Task test_how_to_test_consumers()
    {
        await Bus.Publish<IPingMessage>(new { MessageId = 100 });
        await _received;

        Assert.IsTrue(_pongConsumer.hitme);
        Assert.AreEqual(100, _pongConsumer.pongMessage.MessageId);
    } …
Run Code Online (Sandbox Code Playgroud)

unit-testing masstransit

6
推荐指数
1
解决办法
5461
查看次数

Linq - 如何添加两个列表的内容

我有两个IEnumberable<double>清单.

如何使用Linq将一个列表的每个值添加到另一个列表中相同位置的值?

c# linq

4
推荐指数
1
解决办法
144
查看次数

隐藏Rehosted工作流设计器中的参数

我有一个重新托管的工作流程.我正在创建一个用户可以输入参数的自定义方式.我想从WorkflowDesigner.View中删除Arguments部分.

那可能吗?在此输入图像描述

干杯

theHaggis

wpf workflow-foundation-4

4
推荐指数
1
解决办法
1641
查看次数

NVD3.js yAxis和工具提示不同的percision

我正在使用NVD3.js来显示多线图.

我希望yAxis显示为2位十进制数

编辑的答案

 var chart;

    nv.addGraph(function () {
        chart = nv.models.lineChart()
        .options({
            margin: { left: 140, bottom: 50 },
            x: function (d, i) {
                return i;
            },
            showXAxis: true,
            showYAxis: true,
            transitionDuration: 250,
            tooltips: true,
            tooltipContent: function (key, x, y, e, graph) {
                return '<h3>' + key + '</h3>' +
                       '<p>' + e.point.y + ' at ' + x + '</p>'
            }
        });

        // chart sub-models (ie. xAxis, yAxis, etc) when accessed directly, return themselves, not the parent chart, so …
Run Code Online (Sandbox Code Playgroud)

javascript d3.js nvd3.js

3
推荐指数
1
解决办法
6032
查看次数