private void BindPrimitiveArray(HbmPrimitiveArray arrayMapping, PrimitiveArray model, string prefix, string path, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			BindCollection(arrayMapping, model, prefix, path, containingType, inheritedMetas);

			var element = arrayMapping.ElementRelationship as HbmElement;
			if (element != null)
			{
				string typeName;
				var typeAttribute = element.Type;
				if (typeAttribute != null)
					typeName = typeAttribute.name;
				else
					throw new MappingException("type for <element> was not defined");
				IType type = TypeFactory.HeuristicType(typeName, null);
				if (type == null)
					throw new MappingException("could not interpret type: " + typeName);

				model.ElementClassName = type.ReturnedClass.AssemblyQualifiedName;
			}
		}
		private Mapping.Collection CreatePrimitiveArray(HbmPrimitiveArray primitiveArrayMapping, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			var array = new PrimitiveArray(owner);
			BindPrimitiveArray(primitiveArrayMapping, array, prefix, path, containingType,inheritedMetas);
			AddPrimitiveArraySecondPass(primitiveArrayMapping, array, inheritedMetas);
			return array;
		}
Exemple #3
0
		private Mapping.Collection CreatePrimitiveArray(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType)
		{
			PrimitiveArray array = new PrimitiveArray(owner);
			BindArray(node, array, prefix, path, containingType);
			return array;
		}
				public override Mapping.Collection Create( XmlNode node, string prefix, string path, PersistentClass owner, Mappings mappings )
				{
					PrimitiveArray array = new PrimitiveArray( owner );
					Binder.BindArray( node, array, prefix, path, mappings );
					return array;
				}
		private Mapping.Collection CreatePrimitiveArray(XmlNode node, string prefix, string path,
			PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
		{
			PrimitiveArray array = new PrimitiveArray(owner);
			BindArray(node, array, prefix, path, containingType,inheritedMetas);
			return array;
		}