- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最近我将 NHibernate 库升级到了最新版本 4.0.3.4000。之后 - 在编译期间我遇到了与“Iesi.Collections.Generic.ISet”相关的问题。从细节中我了解到 - 该接口(interface)已被删除,并且可以使用替代选项 - 其中之一是 LinkedHashSet。
我想知道 - 这是替代 ISet 的最佳替代方案吗?
最佳答案
这是来自 release notes :
** Known BREAKING CHANGES from NH3.3.3.GA to 4.0.0.GA
NHibernate now targets .Net 4.0. Many uses of set types from Iesi.Collections have now been changed to use corresponding types from the BCL. The API for these types are slightly different.
现在我们可以使用接口(interface)了
System.Collections.Generic.ISet<T>
及其实现甚至是 System
内置类型,例如
System.Collections.Generic.HashSet<T>
因此减少对 iesi 库的依赖...
但正如这里所讨论的:What is a suitable NHibernate / Iesi.Collections.Generic.ISet<T> replacement? - 我们还可以使用LinkedHashSet<T>
, ReadOnlySet<T>
, SychronizedSet<T>
另请检查 Customer.cs
在 NHibernate 测试项目中:
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace NHibernate.DomainModel.Northwind.Entities
{
public class Customer
{
private readonly ISet<Order> _orders;
public Customer()
{
_orders = new System.Collections.Generic.HashSet<Order>();
}
public virtual ISet<Order> Orders
{
get { return _orders; }
}
...
关于generics - 迁移到 NHibernate 4.0.3.4000 时,Iesi.Collections.Generic.LinkedHashSet<T> 是 Iesi.Collections.Generic.ISet<T> 的最佳替代品吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28545542/
最近我将 NHibernate 库升级到了最新版本 4.0.3.4000。之后 - 在编译期间我遇到了与“Iesi.Collections.Generic.ISet”相关的问题。从细节中我了解到 -
尝试 nHibernate,它说它找不到 Iesi.Collections。 我可以从哪里得到这个?如果它如此重要,它不应该与 nHibernate 下载一起提供吗? 最佳答案 NHibernate
我有 2 个由 NHibernate 处理的类:AssetGroup、AssetAssetGroup 有一个 ISet _assets 集合。AssetGroup 的构造函数会说 _assets =
我在标题中提到的映射中遇到了一些问题。以下是详细信息: class MyDomain { public Iesi.Collections.Generic.ISet MySomeTypes{ ge
该论坛上有许多与 Iesi.Collections 相关的帖子。我试图寻找我的问题的答案,但未能找到解决方案。 我是 nHibernate 和 Iesi.Collections 的新手。 我有一个客户
我有一个类型的集合: Iesi.Collections.Generic public ISet ItemBindings { get; set; } ItemBinding 是 Domain.Mode
在最新版本的 Iesi.Collections 中缺少 Iesi.Collections.Generic.ISet。似乎有三种选择: 链接哈希集 只读设置 同步集 Iesi.Collections.G
我对 NHibernate 非常陌生,所以如果我在这里遗漏了一些微不足道的东西,我深表歉意。我目前正在阅读 packtpub 的一本名为“NHibernate 3 初学者指南”的书。我主要是按照书中的
我已经尝试解决这个问题一天了,但一无所获,所以我希望有人可能已经解决了这个问题。我找到的最接近解决方案的是 How to simply map an NHibernate ISet to IList
.NET 4 ISet<> HashSet<> 可以替换 NHibernate Iesi.Collections ISet 、 HashSet 吗?我正在使用 CaSTLe 代理和 NHibernat
我是一名优秀的程序员,十分优秀!