<div>This might help, there&#39;s a library in the VS directory samples/CSharpSamples.zip/LinqSamples/DynamicQuery take a look, under the covers it&#39;s creating expressions LINQ Expressions.</div>
<div> </div>
<div>In C# you will just chain methods like:</div>
<div>myCollection.Where(&quot;property=myValue&quot;).OrderBy(&quot;anotherProp desc&quot;);</div>
<div> </div>
<div> I think this library could be extended to &quot;easily&quot; create any type of expression in IR. This could be useful to consume existing libraries that already expect an expression.  <br></div>
<div><br> </div>
<div class="gmail_quote">On Thu, Feb 4, 2010 at 5:05 AM, Ryan Riley <span dir="ltr">&lt;<a href="mailto:ryan.riley@panesofglass.org">ryan.riley@panesofglass.org</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="gmail_quote">On Wed, Feb 3, 2010 at 10:59 AM, Ivan Porto Carrero <span dir="ltr">&lt;<a href="mailto:ivan@whiterabbitconsulting.eu" target="_blank">ivan@whiterabbitconsulting.eu</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">hashes?</blockquote>
<div><br></div>
<div>Just an example, though perhaps not the best. :) </div>
<div class="im">
<div><br></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>but may i ask why you&#39;re so hell-bent on linq?</div></blockquote>
<div><br></div></div>
<div>I mostly want some way to use the Reactive Extensions for asynchronous programming and OpenXML SDK for working with Office docs. In particular, I&#39;m thinking of working with IR on top of other C# and/or F# libraries which might be using one or both of those libraries. If I were to write it in all Ruby, I&#39;d probably look at eventmachine for an event loop processor.</div>


<div><br></div>
<div>I&#39;m definitely open to other solutions.</div>
<div class="im">
<div> </div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Linq is a really bad match to ruby with the expressions. it would require some significant amount of work to get that to work correctly.  AFAIK there is no way in IronRuby to build expressions except use the raw API, but nothing is in there yet that makes this easier to do.</div>

</blockquote>
<div><br></div></div>
<div>L2S uses expressions, but I don&#39;t think everything uses them. If all that&#39;s required is a delegate, that&#39;s not so hard and can be be accomplished with a wrapping Ruby method that accepts a block and wraps the block into a Func to pass into the LINQ method. Given some of the previous posts, I think creating a general module to wrap these methods shouldn&#39;t be too difficult. Thoughts?</div>


<div class="im">
<div><br></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Anyway you can reuse anonymous types did you know that? Alex James learnt the trick from Wes Dyer</div>
<div><a href="http://blogs.msdn.com/alexj/archive/2007/11/22/t-castbyexample-t-object-o-t-example.aspx" target="_blank">http://blogs.msdn.com/alexj/archive/2007/11/22/t-castbyexample-t-object-o-t-example.aspx</a></div></blockquote>


<div><br></div></div>
<div>Yeah, I knew about that, but I don&#39;t really want to touch casting by example in Ruby. It might not be bad, but why bother when I can use something from Ruby?</div>
<div><br></div>
<div>Ryan</div>
<div><br></div></div><br>_______________________________________________<br>Ironruby-core mailing list<br><a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>

<br></blockquote></div><br><br clear="all"><br>-- <br>Miguel A. Madero Reyes<br><a href="http://www.miguelmadero.com">www.miguelmadero.com</a> (blog)<br><a href="mailto:me@miguelmadero.com">me@miguelmadero.com</a><br>