This project is read-only.

CSharp Pattern Matching 0.1

Rating: No reviews yet
Downloads: 111
Released: Sep 13, 2009
Updated: Sep 13, 2009 by holoed
Dev status: Alpha Help Icon

Recommended Download

Source Code
source code, 228K, uploaded Sep 13, 2009 - 79 downloads

Other Available Downloads

application, 27K, uploaded Sep 13, 2009 - 32 downloads

Release Notes

This is an alpha release of the Pattern Matching in C# Library.

You can find many examples of how to use this library in the provided unit tests.

One of the best uses is to navigate Linq Expression Trees, like the following:

var Op = new Dictionary<ExpressionType, string> { { ExpressionType.Add, "+" } };

Expression<Func<int,int,int>> add = (x,y) => x + y;

Func<Expression, string> toString = null;
 toString = exp =>
    .With<LambdaExpression>(l => toString(l.Body))
    .With<ParameterExpression>(p => p.Name)
    .With<BinaryExpression>(b => String.Format("{0} {1} {2}", toString(b.Left), Op[b.NodeType], toString(b.Right)))


Reviews for this release

No reviews yet for this release.