From: <fab...@us...> - 2010-07-28 22:35:02
|
Revision: 5080 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5080&view=rev Author: fabiomaulo Date: 2010-07-28 22:34:55 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Refactoring (removed unneeded method) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/Functions/DefaultLinqToHqlGeneratorsRegistry.cs Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/DefaultLinqToHqlGeneratorsRegistry.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/DefaultLinqToHqlGeneratorsRegistry.cs 2010-07-28 22:21:16 UTC (rev 5079) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/DefaultLinqToHqlGeneratorsRegistry.cs 2010-07-28 22:34:55 UTC (rev 5080) @@ -12,7 +12,6 @@ public DefaultLinqToHqlGeneratorsRegistry() { - // TODO - could use reflection here Register(new StandardLinqExtensionMethodGenerator()); Register(new QueryableGenerator()); Register(new StringGenerator()); @@ -32,15 +31,6 @@ return false; } - protected bool GetRegisteredMethodGenerator(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) - { - if (registeredMethods.TryGetValue(method, out methodGenerator)) - { - return true; - } - return false; - } - public virtual bool TryGetGenerator(MethodInfo method, out IHqlGeneratorForMethod generator) { if (method.IsGenericMethod) @@ -48,7 +38,7 @@ method = method.GetGenericMethodDefinition(); } - if (GetRegisteredMethodGenerator(method, out generator)) return true; + if (registeredMethods.TryGetValue(method, out generator)) return true; // Not that either. Let's query each type generator to see if it can handle it if (GetMethodGeneratorForType(method, out generator)) return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |