|
From: <fab...@us...> - 2010-07-28 21:42:37
|
Revision: 5077
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5077&view=rev
Author: fabiomaulo
Date: 2010-07-28 21:42:28 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
Generalized IHqlGeneratorForType
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs
trunk/nhibernate/src/NHibernate/Linq/Functions/IHqlGeneratorForType.cs
Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs 2010-07-28 21:35:11 UTC (rev 5076)
+++ trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs 2010-07-28 21:42:28 UTC (rev 5077)
@@ -1,42 +1,45 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-using NHibernate.Linq.Visitors;
namespace NHibernate.Linq.Functions
{
- abstract public class BaseHqlGeneratorForType : IHqlGeneratorForType
- {
- protected readonly List<IHqlGeneratorForMethod> MethodRegistry = new List<IHqlGeneratorForMethod>();
- protected readonly List<IHqlGeneratorForProperty> PropertyRegistry = new List<IHqlGeneratorForProperty>();
+ public abstract class BaseHqlGeneratorForType : IHqlGeneratorForType
+ {
+ protected readonly List<IHqlGeneratorForMethod> MethodRegistry = new List<IHqlGeneratorForMethod>();
+ protected readonly List<IHqlGeneratorForProperty> PropertyRegistry = new List<IHqlGeneratorForProperty>();
- public void Register(DefaultLinqToHqlGeneratorsRegistry functionRegistry)
- {
- foreach (var generator in MethodRegistry)
- {
- foreach (var method in generator.SupportedMethods)
- {
- functionRegistry.RegisterGenerator(method, generator);
- }
- }
+ #region IHqlGeneratorForType Members
- foreach (var generator in PropertyRegistry)
- {
- foreach (var property in generator.SupportedProperties)
- {
- functionRegistry.RegisterGenerator(property, generator);
- }
- }
- }
+ public void Register(ILinqToHqlGeneratorsRegistry functionRegistry)
+ {
+ foreach (IHqlGeneratorForMethod generator in MethodRegistry)
+ {
+ foreach (MethodInfo method in generator.SupportedMethods)
+ {
+ functionRegistry.RegisterGenerator(method, generator);
+ }
+ }
- public virtual bool SupportsMethod(MethodInfo method)
- {
- return false;
- }
+ foreach (IHqlGeneratorForProperty generator in PropertyRegistry)
+ {
+ foreach (MemberInfo property in generator.SupportedProperties)
+ {
+ functionRegistry.RegisterGenerator(property, generator);
+ }
+ }
+ }
- public virtual IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method)
- {
- throw new NotSupportedException();
- }
- }
+ public virtual bool SupportsMethod(MethodInfo method)
+ {
+ return false;
+ }
+
+ public virtual IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method)
+ {
+ throw new NotSupportedException();
+ }
+
+ #endregion
+ }
}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/IHqlGeneratorForType.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Linq/Functions/IHqlGeneratorForType.cs 2010-07-28 21:35:11 UTC (rev 5076)
+++ trunk/nhibernate/src/NHibernate/Linq/Functions/IHqlGeneratorForType.cs 2010-07-28 21:42:28 UTC (rev 5077)
@@ -2,10 +2,10 @@
namespace NHibernate.Linq.Functions
{
- public interface IHqlGeneratorForType
- {
- void Register(DefaultLinqToHqlGeneratorsRegistry functionRegistry);
- bool SupportsMethod(MethodInfo method);
- IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method);
- }
+ public interface IHqlGeneratorForType
+ {
+ void Register(ILinqToHqlGeneratorsRegistry functionRegistry);
+ bool SupportsMethod(MethodInfo method);
+ IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method);
+ }
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|