public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
		{
			object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
			int index = (int) role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);
			for (int i = tempList.Count; i <= index; i++)
			{
				tempList.Add(null);
			}
			tempList[index] = element;
			return element;
		}
Example #2
0
        public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
        {
            object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
            object index = role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

            map[index] = element;
            return element;
        }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="rs"></param>
		/// <param name="persister"></param>
		/// <param name="owner"></param>
		/// <returns></returns>
		public override object ReadFrom( IDataReader rs, ICollectionPersister persister, object owner )
		{
			object element = persister.ReadElement(rs, owner, Session);
			int index = (int)persister.ReadIndex( rs, Session );

			for( int i=list.Count; i<=index; i++ )
			{
				list.Insert( i, null );
			}

			list[ index ] = element;
			return element;
		}
		public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
		{
			object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
			int index = (int) role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

			//pad with nulls from the current last element up to the new index
			for (int i = list.Count; i <= index; i++)
			{
				list.Insert(i, DefaultForType);
			}

			list[index] = element;
			return element;
		}