|
From: <fab...@us...> - 2011-04-14 19:50:44
|
Revision: 5703
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5703&view=rev
Author: fabiomaulo
Date: 2011-04-14 19:50:38 +0000 (Thu, 14 Apr 2011)
Log Message:
-----------
Minor (API simplified)
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Mapping/ByCode/IPropertyContainerMapper.cs
trunk/nhibernate/src/NHibernate/Mapping/ByCode/Impl/CustomizersImpl/PropertyContainerCustomizer.cs
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/IPropertyContainerMapper.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/IPropertyContainerMapper.cs 2011-04-14 19:31:59 UTC (rev 5702)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/IPropertyContainerMapper.cs 2011-04-14 19:50:38 UTC (rev 5703)
@@ -31,14 +31,20 @@
void Set<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
Action<ISetPropertiesMapper<TEntity, TElement>> collectionMapping,
Action<ICollectionElementRelation<TElement>> mapping);
+ void Set<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<ISetPropertiesMapper<TEntity, TElement>> collectionMapping);
void Bag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
Action<IBagPropertiesMapper<TEntity, TElement>> collectionMapping,
Action<ICollectionElementRelation<TElement>> mapping);
+ void Bag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IBagPropertiesMapper<TEntity, TElement>> collectionMapping);
void List<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
Action<IListPropertiesMapper<TEntity, TElement>> collectionMapping,
Action<ICollectionElementRelation<TElement>> mapping);
+ void List<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IListPropertiesMapper<TEntity, TElement>> collectionMapping);
void Map<TKey, TElement>(Expression<Func<TEntity, IDictionary<TKey, TElement>>> property,
Action<IMapPropertiesMapper<TEntity, TKey, TElement>> collectionMapping,
@@ -48,10 +54,14 @@
void Map<TKey, TElement>(Expression<Func<TEntity, IDictionary<TKey, TElement>>> property,
Action<IMapPropertiesMapper<TEntity, TKey, TElement>> collectionMapping,
Action<ICollectionElementRelation<TElement>> mapping);
+ void Map<TKey, TElement>(Expression<Func<TEntity, IDictionary<TKey, TElement>>> property,
+ Action<IMapPropertiesMapper<TEntity, TKey, TElement>> collectionMapping);
void IdBag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
Action<IIdBagPropertiesMapper<TEntity, TElement>> collectionMapping,
Action<ICollectionElementRelation<TElement>> mapping);
+ void IdBag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IIdBagPropertiesMapper<TEntity, TElement>> collectionMapping);
}
public interface IPropertyContainerMapper<TEntity> : ICollectionPropertiesContainerMapper<TEntity>, IPlainPropertyContainerMapper<TEntity> where TEntity : class {}
Modified: trunk/nhibernate/src/NHibernate/Mapping/ByCode/Impl/CustomizersImpl/PropertyContainerCustomizer.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Mapping/ByCode/Impl/CustomizersImpl/PropertyContainerCustomizer.cs 2011-04-14 19:31:59 UTC (rev 5702)
+++ trunk/nhibernate/src/NHibernate/Mapping/ByCode/Impl/CustomizersImpl/PropertyContainerCustomizer.cs 2011-04-14 19:50:38 UTC (rev 5703)
@@ -133,6 +133,12 @@
RegisterSetMapping(property, collectionMapping, mapping);
}
+ public void Set<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<ISetPropertiesMapper<TEntity, TElement>> collectionMapping)
+ {
+ Set(property, collectionMapping, x => { });
+ }
+
protected virtual void RegisterSetMapping<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property, Action<ISetPropertiesMapper<TEntity, TElement>> collectionMapping, Action<ICollectionElementRelation<TElement>> mapping)
{
MemberInfo member = TypeExtensions.DecodeMemberAccessExpression(property);
@@ -150,6 +156,11 @@
{
RegisterBagMapping(property, collectionMapping, mapping);
}
+ public void Bag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IBagPropertiesMapper<TEntity, TElement>> collectionMapping)
+ {
+ Bag(property, collectionMapping, x => { });
+ }
protected virtual void RegisterBagMapping<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property, Action<IBagPropertiesMapper<TEntity, TElement>> collectionMapping, Action<ICollectionElementRelation<TElement>> mapping)
{
@@ -168,6 +179,11 @@
{
RegisterListMapping(property, collectionMapping, mapping);
}
+ public void List<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IListPropertiesMapper<TEntity, TElement>> collectionMapping)
+ {
+ List(property, collectionMapping, x => { });
+ }
protected virtual void RegisterListMapping<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property, Action<IListPropertiesMapper<TEntity, TElement>> collectionMapping, Action<ICollectionElementRelation<TElement>> mapping)
{
@@ -187,6 +203,11 @@
{
RegisterMapMapping(property, collectionMapping, keyMapping, mapping);
}
+ public void Map<TKey, TElement>(Expression<Func<TEntity, IDictionary<TKey, TElement>>> property,
+ Action<IMapPropertiesMapper<TEntity, TKey, TElement>> collectionMapping)
+ {
+ Map(property, collectionMapping, keyMapping => { }, x => { });
+ }
protected virtual void RegisterMapMapping<TKey, TElement>(Expression<Func<TEntity, IDictionary<TKey, TElement>>> property, Action<IMapPropertiesMapper<TEntity, TKey, TElement>> collectionMapping, Action<IMapKeyRelation<TKey>> keyMapping, Action<ICollectionElementRelation<TElement>> mapping)
{
@@ -217,6 +238,12 @@
RegisterIdBagMapping(property, collectionMapping, mapping);
}
+ public void IdBag<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property,
+ Action<IIdBagPropertiesMapper<TEntity, TElement>> collectionMapping)
+ {
+ RegisterIdBagMapping(property, collectionMapping, x => { });
+ }
+
protected virtual void RegisterIdBagMapping<TElement>(Expression<Func<TEntity, IEnumerable<TElement>>> property, Action<IIdBagPropertiesMapper<TEntity, TElement>> collectionMapping, Action<ICollectionElementRelation<TElement>> mapping)
{
MemberInfo member = TypeExtensions.DecodeMemberAccessExpression(property);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|