From: <fab...@us...> - 2010-07-28 17:48:10
|
Revision: 5066 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5066&view=rev Author: fabiomaulo Date: 2010-07-28 17:48:04 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Minor (renaming) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs 2010-07-28 16:51:31 UTC (rev 5065) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/BaseHqlGeneratorForType.cs 2010-07-28 17:48:04 UTC (rev 5066) @@ -16,7 +16,7 @@ { foreach (var method in generator.SupportedMethods) { - functionRegistry.RegisterMethodGenerator(method, generator); + functionRegistry.RegisterGenerator(method, generator); } } @@ -24,7 +24,7 @@ { foreach (var property in generator.SupportedProperties) { - functionRegistry.RegisterPropertyGenerator(property, generator); + functionRegistry.RegisterGenerator(property, generator); } } } Modified: trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2010-07-28 16:51:31 UTC (rev 5065) +++ trunk/nhibernate/src/NHibernate/Linq/Functions/FunctionRegistry.cs 2010-07-28 17:48:04 UTC (rev 5066) @@ -13,9 +13,9 @@ { public static readonly FunctionRegistry Instance = new FunctionRegistry(); - private readonly Dictionary<MethodInfo, IHqlGeneratorForMethod> _registeredMethods = new Dictionary<MethodInfo, IHqlGeneratorForMethod>(); - private readonly Dictionary<MemberInfo, IHqlGeneratorForProperty> _registeredProperties = new Dictionary<MemberInfo, IHqlGeneratorForProperty>(); - private readonly List<IHqlGeneratorForType> _typeGenerators = new List<IHqlGeneratorForType>(); + private readonly Dictionary<MethodInfo, IHqlGeneratorForMethod> registeredMethods = new Dictionary<MethodInfo, IHqlGeneratorForMethod>(); + private readonly Dictionary<MemberInfo, IHqlGeneratorForProperty> registeredProperties = new Dictionary<MemberInfo, IHqlGeneratorForProperty>(); + private readonly List<IHqlGeneratorForType> typeGenerators = new List<IHqlGeneratorForType>(); private FunctionRegistry() { @@ -26,7 +26,7 @@ Register(new ICollectionGenerator()); } - public IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method) + public IHqlGeneratorForMethod GetGenerator(MethodInfo method) { IHqlGeneratorForMethod methodGenerator; @@ -60,7 +60,7 @@ { methodGenerator = null; - foreach (var typeGenerator in _typeGenerators.Where(typeGenerator => typeGenerator.SupportsMethod(method))) + foreach (var typeGenerator in typeGenerators.Where(typeGenerator => typeGenerator.SupportsMethod(method))) { methodGenerator = typeGenerator.GetMethodGenerator(method); return true; @@ -85,18 +85,18 @@ private bool GetRegisteredMethodGenerator(MethodInfo method, out IHqlGeneratorForMethod methodGenerator) { - if (_registeredMethods.TryGetValue(method, out methodGenerator)) + if (registeredMethods.TryGetValue(method, out methodGenerator)) { return true; } return false; } - public IHqlGeneratorForProperty GetPropertyGenerator(MemberInfo member) + public IHqlGeneratorForProperty GetGenerator(MemberInfo member) { IHqlGeneratorForProperty propertyGenerator; - if (_registeredProperties.TryGetValue(member, out propertyGenerator)) + if (registeredProperties.TryGetValue(member, out propertyGenerator)) { return propertyGenerator; } @@ -105,19 +105,19 @@ return null; } - public void RegisterMethodGenerator(MethodInfo method, IHqlGeneratorForMethod generator) + public void RegisterGenerator(MethodInfo method, IHqlGeneratorForMethod generator) { - _registeredMethods.Add(method, generator); + registeredMethods.Add(method, generator); } - public void RegisterPropertyGenerator(MemberInfo property, IHqlGeneratorForProperty generator) + public void RegisterGenerator(MemberInfo property, IHqlGeneratorForProperty generator) { - _registeredProperties.Add(property, generator); + registeredProperties.Add(property, generator); } private void Register(IHqlGeneratorForType typeMethodGenerator) { - _typeGenerators.Add(typeMethodGenerator); + typeGenerators.Add(typeMethodGenerator); typeMethodGenerator.Register(this); } } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-07-28 16:51:31 UTC (rev 5065) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/HqlGeneratorExpressionTreeVisitor.cs 2010-07-28 17:48:04 UTC (rev 5066) @@ -351,7 +351,7 @@ } // Look for "special" properties (DateTime.Month etc) - var generator = FunctionRegistry.GetPropertyGenerator(expression.Member); + var generator = FunctionRegistry.GetGenerator(expression.Member); if (generator != null) { @@ -394,7 +394,7 @@ protected HqlTreeNode VisitMethodCallExpression(MethodCallExpression expression) { - var generator = FunctionRegistry.GetMethodGenerator(expression.Method); + var generator = FunctionRegistry.GetGenerator(expression.Method); return generator.BuildHql(expression.Method, expression.Object, expression.Arguments, _hqlTreeBuilder, this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |