The Merge will register the same generator for all SupportedMethods/SupportedProperties defined inside the generator itself, and yes, the intention of Merge extension-method is to have better readability and push users to define SupportedMethods/SupportedProperties inside the generator itself.
On Thu, Dec 23, 2010 at 6:14 AM, Glenn <[email protected]> wrote: > I'm registering a LinqToHql generator and have found several examples > online, but there are two different implementations of the > LinqToHqlGeneratorsRegistry: > > public class MyLinqToHqlGeneratorsRegistry : > DefaultLinqToHqlGeneratorsRegistry > { > public MyLinqToHqlGeneratorsRegistry() : base() > { > RegisterGenerator(ReflectionHelper.GetMethodDefinition(() > => LinqExtensions.IsLike(null, null)), > new IsLikeGenerator()); > } > } > > and > > public class MyLinqToHqlGeneratorsRegistry : > DefaultLinqToHqlGeneratorsRegistry > { > public MyLinqToHqlGeneratorsRegistry() : base() > { > this.Merge(new IsLikeGenerator()); > } > } > > They both seem to work and all my tests pass in both cases. What is > the difference between the two? Personally, I like the latter on for > it's brevity and readability. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
