Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NH-3272 - Move TypeHelperExtensionMethods to a more internal namespace #147

Closed
wants to merge 2 commits into from

Conversation

mahara
Copy link
Contributor

@mahara mahara commented Sep 15, 2012

@oskarb
Copy link
Member

oskarb commented Sep 15, 2012

Aah... what a peculiar little class you've found. I'm thinking that it may not belong under NHibernate.Linq at all, plus more:

  • Most methods operator on System.Type, so it should really be called TypeExtensionMethods to follow the general pattern, and be in NHibernate.Util, since it hasn't really got anything to do with LINQ.
  • Two methods are out-of-place (i.e. have nothing to do with SystemType):
    • ForEach(), (which happens to be completely unused) fits better in Util/EnumerableExtensions.cs.
    • As(), should be named Cast() as it has different semantics compared to the "as" keyword. But it's only used in 6 places, so I would prefer to remove it completely and use normal casts where needed.

It would be much appreciated if you could adapt the patch according to the above.

@mahara
Copy link
Contributor Author

mahara commented Sep 15, 2012

OK, done.

oskarb added a commit that referenced this pull request Sep 16, 2012
…ensions.cs. Plus remove some mostly useless code. Pull request #147 from Maximilian Haru Raditya, NH-3272.
@oskarb
Copy link
Member

oskarb commented Sep 16, 2012

Thanks!

@oskarb oskarb closed this Sep 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants