Replace enumerators

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-11-28 15:13:53 -08:00
parent a59d1fa97e
commit b97d9bd227
2 changed files with 4 additions and 3 deletions

View File

@@ -27,8 +27,7 @@ namespace Orchard.Scripting.Ast {
public override IEnumerable<AstNode> Children {
get {
yield return _left;
yield return _right;
return new List<AstNode>(2) { _left, _right };
}
}

View File

@@ -16,7 +16,9 @@ namespace Orchard.Scripting.Ast {
public AstNode Operand { get { return _operand; } }
public override IEnumerable<AstNode> Children {
get { yield return _operand; }
get {
return new List<AstNode>(1) { _operand };
}
}
public override object Accept(AstVisitor visitor) {