当前位置: 首页>>代码示例>>C#>>正文


C# IType.IsDirty方法代码示例

本文整理汇总了C#中IType.IsDirty方法的典型用法代码示例。如果您正苦于以下问题:C# IType.IsDirty方法的具体用法?C# IType.IsDirty怎么用?C# IType.IsDirty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IType的用法示例。


在下文中一共展示了IType.IsDirty方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EqualsSnapshot

		public override bool EqualsSnapshot(IType elementType)
		{
			IDictionary xmap = (IDictionary) GetSnapshot();
			if (xmap.Count != this.map.Count)
			{
				return false;
			}
			foreach (DictionaryEntry entry in map)
			{
				if (elementType.IsDirty(entry.Value, xmap[entry.Key], Session))
				{
					return false;
				}
			}
			return true;
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:16,代码来源:PersistentMap.cs

示例2: EqualsSnapshot

		/// <summary>
		/// 
		/// </summary>
		/// <param name="elementType"></param>
		/// <returns></returns>
		public override bool EqualsSnapshot( IType elementType )
		{
			IList sn = ( IList ) GetSnapshot();
			if( sn.Count != this.list.Count )
			{
				return false;
			}
			for( int i = 0; i < list.Count; i++ )
			{
				if( elementType.IsDirty( list[ i ], sn[ i ], Session ) )
				{
					return false;
				}
			}
			return true;
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:21,代码来源:List.cs

示例3: NeedsUpdating

		public override bool NeedsUpdating(object entry, int i, IType elemType)
		{
			Array sn = (Array) GetSnapshot();
			return
				i < sn.Length && sn.GetValue(i) != null && array.GetValue(i) != null
				&& elemType.IsDirty(array.GetValue(i), sn.GetValue(i), Session);
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:7,代码来源:PersistentArrayHolder.cs

示例4: NeedsUpdating

		public override bool NeedsUpdating(object entry, int i, IType elemType)
		{
			IList sn = (IList) GetSnapshot();
			return i < sn.Count && sn[i] != null && list[i] != null && elemType.IsDirty(list[i], sn[i], Session);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:5,代码来源:PersistentList.cs

示例5: NeedsInserting

		public override bool NeedsInserting(object entry, int i, IType elemType)
		{
			IDictionary sn = (IDictionary) GetSnapshot();
			object oldKey = sn[entry];
			// note that it might be better to iterate the snapshot but this is safe,
			// assuming the user implements equals() properly, as required by the PersistentSet
			// contract!
			return oldKey == null || elemType.IsDirty(oldKey, entry, Session);
		}
开发者ID:ray2006,项目名称:WCell,代码行数:9,代码来源:PersistentSet.cs

示例6: GetDeletes

		public override IEnumerable GetDeletes(IType elemType, bool indexIsFormula)
		{
			IList deletes = new ArrayList();
			IDictionary snapshot = (IDictionary) GetSnapshot();

			foreach (DictionaryEntry e in snapshot)
			{
				object test = e.Key;

				if (internalSet.Contains(test) == false)
				{
					deletes.Add(test);
				}
			}

			foreach (object obj in internalSet)
			{
				//object testKey = e.Key;
				object oldKey = snapshot[obj];

				if (oldKey != null && elemType.IsDirty(obj, oldKey, Session))
				{
					deletes.Add(obj);
				}
			}

			return deletes;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:28,代码来源:PersistentSet.cs

示例7: NeedsUpdating

		public override bool NeedsUpdating(object entry, int i, IType elemType)
		{
			if (entry == null)
			{
				return false;
			}
			IDictionary snap = (IDictionary) GetSnapshot();

			object id = GetIdentifier(i);
			if (id == null)
			{
				return false;
			}

			object old = snap[id];
			return old != null && elemType.IsDirty(old, entry, Session);
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:17,代码来源:PersistentIdentifierBag.cs

示例8: NeedsUpdating

 public override bool NeedsUpdating(object entry, int i, IType elemType)
 {
     IDictionary sn = (IDictionary) GetSnapshot();
     DictionaryEntry e = (DictionaryEntry) entry;
     object snValue = sn[e.Key];
     return (e.Value != null && snValue != null && elemType.IsDirty(snValue, e.Value, Session));
 }
开发者ID:zibler,项目名称:zibler,代码行数:7,代码来源:PersistentMap.cs

示例9: NeedsUpdating

		public override bool NeedsUpdating(object entry, int i, IType elemType)
		{
			IDictionary sn = (IDictionary) GetSnapshot();
			DictionaryEntry e = (DictionaryEntry) entry;
			object snValue = sn[e.Key];
			bool isNew = !sn.Contains(e.Key);
			return e.Value != null && snValue != null && elemType.IsDirty(snValue, e.Value, Session)
				|| (!isNew && ((e.Value == null) != (snValue == null)));
		}
开发者ID:tkellogg,项目名称:NHibernate3-withProxyHooks,代码行数:9,代码来源:PersistentMap.cs

示例10: EqualsSnapshot

		public override bool EqualsSnapshot(IType elementType)
		{
			IDictionary snapshot = (IDictionary) GetSnapshot();
			if (snapshot.Count != internalSet.Count)
			{
				return false;
			}
			else
			{
				foreach (object obj in internalSet)
				{
					object oldValue = snapshot[obj];
					if (oldValue == null || elementType.IsDirty(oldValue, obj, Session))
					{
						return false;
					}
				}
			}

			return true;
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:21,代码来源:PersistentSet.cs

示例11: EqualsSnapshot

		/// <summary>
		/// 
		/// </summary>
		/// <param name="elementType"></param>
		/// <returns></returns>
		public override bool EqualsSnapshot( IType elementType )
		{
			Array snapshot = GetSnapshot() as Array;
			
			int xlen = snapshot.Length;
			if( xlen != array.Length )
			{
				return false;
			}
			for( int i = 0; i < xlen; i++ )
			{
				if( elementType.IsDirty( snapshot.GetValue( i ), array.GetValue( i ), Session ) )
				{
					return false;
				}
			}
			return true;
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:23,代码来源:ArrayHolder.cs

示例12: EqualsSnapshot

		public override bool EqualsSnapshot(IType elementType)
		{
			IDictionary snap = (IDictionary) GetSnapshot();
			if (snap.Count != values.Count)
			{
				return false;
			}

			for (int i = 0; i < values.Count; i++)
			{
				object val = values[i];
				object id = identifiers[i];
				if (id == null)
				{
					return false;
				}

				object old = snap[id];
				if (elementType.IsDirty(old, val, Session))
				{
					return false;
				}
			}

			return true;
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:26,代码来源:PersistentIdentifierBag.cs


注:本文中的IType.IsDirty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。