为什么我会得到“不明确的匹配”这里有错误吗?

发布于 2024-09-11 01:11:56 字数 1412 浏览 5 评论 0原文

我当前正在处理的页面根据其所在的投资组合搜索各种实体。为了应用其他搜索条件(除了投资组合之外),页面首先按投资组合获取实体,然后将条件应用于它们,如下所示:

IPortfolioLogic logic = this.objectFactory.GetObject<IPortfolioLogic>(this.dal);
PortfolioEntity portfolio = logic.GetPortfolioByID(this.context, this.dal, requestDto.Portfolio.UniqueID);
var unfilteredEntities = portfolio.EntityGroupEntity.EntityGroupItemList.Select(i=>i.EntityID);
IList<EntityEntity> entities = criteria.ApplyTo<EntityEntity>(unfilteredEntities);

最后一行将其发送到此代码:

public IList<T> ApplyTo<T>(IEnumerable<T> list) {
        IList tmpList = this.ApplyTo(list, typeof(T));

        IList<T> resultList;

        if (tmpList == null) {
            resultList = null;
        }
        else {
            resultList = new List<T>();

            foreach (object tmp in tmpList) {
                resultList.Add((T)tmp);
            }
        }

        return resultList;
    }

public IList ApplyTo(IEnumerable list, Type entitiesType) {
        return this.GetEvaluator().ApplyTo(list, entitiesType);
    }

从这里开始,它会获取与投资组合相关且也符合条件的特定实体。

在我的本地机器上,这工作得很好。它找到实体,并对它们执行标准。不过,在我们的农场中,会显示此消息:

Message: Error #0e3c57ad-a834-47ab-996a-deecb80fccca
Ambiguous match found.:

在打印出来的堆栈跟踪中,它会转到上面提到的那些行。所有其他位置都经常被其他进程使用,并且以前都没有遇到过此问题。上面提到的几行是唯一不同的地方。

有什么想法吗?

The page that I'm currently working on searches for various entities based on what portfolio they are in. In order to apply the other search criteria (besides for Portfolio) the page first gets the entities by portfolio and then applies the criteria to them, as shown here:

IPortfolioLogic logic = this.objectFactory.GetObject<IPortfolioLogic>(this.dal);
PortfolioEntity portfolio = logic.GetPortfolioByID(this.context, this.dal, requestDto.Portfolio.UniqueID);
var unfilteredEntities = portfolio.EntityGroupEntity.EntityGroupItemList.Select(i=>i.EntityID);
IList<EntityEntity> entities = criteria.ApplyTo<EntityEntity>(unfilteredEntities);

This last line sends it to this code:

public IList<T> ApplyTo<T>(IEnumerable<T> list) {
        IList tmpList = this.ApplyTo(list, typeof(T));

        IList<T> resultList;

        if (tmpList == null) {
            resultList = null;
        }
        else {
            resultList = new List<T>();

            foreach (object tmp in tmpList) {
                resultList.Add((T)tmp);
            }
        }

        return resultList;
    }

public IList ApplyTo(IEnumerable list, Type entitiesType) {
        return this.GetEvaluator().ApplyTo(list, entitiesType);
    }

From here it goes and grabs those specific entities related to the portfolio that also match the criteria.

On my local machine this works perfectly. It finds the entities, and does the criteria on them. On our farm, though, this message shows up:

Message: Error #0e3c57ad-a834-47ab-996a-deecb80fccca
Ambiguous match found.:

In the stack trace that gets printed out it goes to those lines mentioned above. All of the other locations are frequently used by other processes and none of them have experienced this problem before. The lines mentioned above are the only thing different.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

平生欢 2024-09-18 01:11:56

您可能混合了不同的版本。

尝试重新部署所有程序集。

You probably have a mix of different versions.

Try re-deploying all of the assemblies.

暖风昔人 2024-09-18 01:11:56

只是有一个类似的错误,原因是我有一个控件的首页定义,该控件的 id 文本与后面代码中的私有变量名相同,重命名其中一个,问题就解决了。

Just had a similar error, and the reason was that I had a front page definition for a control that had the same id text as a private variable name in the code behind, renamed one of them and the problem was solved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文