Skip to content

Commit

Permalink
added string length into javascript formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
craiggwilson committed May 4, 2010
1 parent 2fca9ae commit 58e2610
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/MongoDB/Linq/Translators/JavascriptFormatter.cs
Expand Up @@ -120,6 +120,15 @@ protected override Expression VisitMemberAccess(MemberExpression m)
return m;
}
}
else if (m.Member.DeclaringType == typeof(string))
{
if (m.Member.Name == "Length")
{
Visit(m.Expression);
_js.Append(".length");
return m;
}
}
else if (typeof(ICollection).IsAssignableFrom(m.Member.DeclaringType))
{
if (m.Member.Name == "Count")
Expand Down

0 comments on commit 58e2610

Please sign in to comment.