tag:blogger.com,1999:blog-5822946.post114002993735588381..comments2014-09-17T10:15:34.033-05:00Comments on Marc's Musings: Dynamic sorting of objects using lightweight code generation.IDisposablehttp://www.blogger.com/profile/02275315449689041289noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-5822946.post-28764012542262184452008-01-14T13:38:00.000-06:002008-01-14T13:38:00.000-06:00I've put this project up on CodePlex for further d...I've put this project up on CodePlex for further development, so it would be best to open an issue there. If you can give me a simple (not full NHibernate) example that I can include in the test suite, I will <B>happily</B> fix it.IDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.comtag:blogger.com,1999:blog-5822946.post-45685974586318791072008-01-14T13:01:00.000-06:002008-01-14T13:01:00.000-06:00Are you still working on this? I am using nhiberna...Are you still working on this? I am using nhibernate to populate my objects and works fine as long as the object is completely populated. I modified your code to accept nested objects and that works. but now if an object has a nested object that has a value of null but is not a nullable object it blows up when tring to compair the two. Any suggestions?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1151518894706007202006-06-28T13:21:00.000-05:002006-06-28T13:21:00.000-05:00The class now handles structs just fine, see downl...The class now handles structs just fine, see download link at top of the post.IDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1147833508013029782006-05-16T21:38:00.000-05:002006-05-16T21:38:00.000-05:00If you've got a class (or list) that shows this er...If you've got a class (or list) that shows this error, I'll extend it to handle that situation. BTW, I can't contact you if you post anonymously!<BR/><BR/>If desired, mail me directly at IDisposable@gmail.comIDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1147825620157134412006-05-16T19:27:00.000-05:002006-05-16T19:27:00.000-05:00Any idea how to make this work with a list of stru...Any idea how to make this work with a list of structs instead of a list of classes? It throws an AccessViolation ever time I try.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1142635607917609022006-03-17T16:46:00.000-06:002006-03-17T16:46:00.000-06:00Revisions are hereRevisions are <A HREF="http://musingmarc.blogspot.com/2006/03/extending-dynamic-sorting-of-objects.html" REL="nofollow">here</A>IDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1141951428692196972006-03-09T18:43:00.000-06:002006-03-09T18:43:00.000-06:00Updated the code (extensively) to handle reference...Updated the code (extensively) to handle reference-types that are nullable. This adds a little to the overhead, but prevents you from having to special-case the CompareTo methods. See <A HREF="http://musingmarc.blogspot.com/2006/03/marcs-musings-dynamic-sorting-of.html" REL="nofollow">this</A> post.IDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1141927295226490312006-03-09T12:01:00.000-06:002006-03-09T12:01:00.000-06:00I've got it! I implemented there my custom Compare...I've got it! I implemented there my custom Compare method instead of CompareTo method and changed Callvirt to Call. Thanks anyway for great DynamicComparer!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1141924318442847752006-03-09T11:11:00.000-06:002006-03-09T11:11:00.000-06:00Hi Marc, I'm trying to sort strings where some of ...Hi Marc, I'm trying to sort strings where some of them are null and I am getting NullReferenceException. Is it by design? I don't have any experience in IL. How should I change IL code to enable sorting of null strings too? Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5822946.post-1141235130366203362006-03-01T11:45:00.000-06:002006-03-01T11:45:00.000-06:00Rich reported a bug (oops, deleted the comment) wh...Rich reported a bug (oops, deleted the comment) when comparing Enum values. I've updated the DynamicComparer and Utilities zips to have the fix. Seems you need to box Enum(s) before calling System.Enum.CompareTo() -- odd...IDisposablehttps://www.blogger.com/profile/02275315449689041289noreply@blogger.com