/// <summary>
        /// Determine if the collection is "really" dirty, by checking dirtiness
        /// of the collection elements, if necessary
        /// </summary>
        private void Dirty(IPersistentCollection collection)
        {
            // if the collection is initialized and it was previously persistent
            // initialize the dirty flag
            bool forceDirty = collection.WasInitialized && !collection.IsDirty && LoadedPersister != null &&
                              LoadedPersister.IsMutable &&
                              (collection.IsDirectlyAccessible || LoadedPersister.ElementType.IsMutable) &&
                              !collection.EqualsSnapshot(LoadedPersister);

            if (forceDirty)
            {
                collection.Dirty();
            }
        }
Beispiel #2
0
		/// <summary> 
		/// Determine if the collection is "really" dirty, by checking dirtiness
		/// of the collection elements, if necessary
		/// </summary>
		private void Dirty(IPersistentCollection collection)
		{
			// if the collection is initialized and it was previously persistent
			// initialize the dirty flag
			bool forceDirty = collection.WasInitialized && !collection.IsDirty && LoadedPersister != null
			                  && LoadedPersister.IsMutable
			                  && (collection.IsDirectlyAccessible || LoadedPersister.ElementType.IsMutable)
			                  && !collection.EqualsSnapshot(LoadedPersister);

			if (forceDirty)
			{
				collection.Dirty();
			}
		}