Esempio n. 1
0
		private static ICollection GetAllElementsCollection(CollectionType collectionType, object collection)
		{
			return collectionType.GetElementsCollection(collection);
		}
Esempio n. 2
0
		public static ICollection GetLoadedElementsCollection(CollectionType collectionType, object collection)
		{
			if (CollectionIsInitialized(collection))
			{
				// handles arrays and newly instantiated collections
				return collectionType.GetElementsCollection(collection);
			}
			else
			{
				// does not handle arrays (that's ok, cos they can't be lazy)
				// or newly instantiated collections so we can do the cast
				return ((IPersistentCollection) collection).QueuedAddsCollection;
			}
		}