From 6fe8b41ca41d8a7bc96e681831778260a13bcf39 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Fri, 2 Mar 2018 22:14:22 -0800 Subject: [PATCH] Remove use of Linq --- Ooui/Node.cs | 9 +++++++-- Ooui/Platform.cs | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Ooui/Node.cs b/Ooui/Node.cs index 8de9494..c7456f6 100644 --- a/Ooui/Node.cs +++ b/Ooui/Node.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; namespace Ooui { @@ -28,7 +27,13 @@ namespace Ooui } public virtual string Text { - get { return String.Join ("", from c in Children select c.Text); } + get { + var sb = new System.Text.StringBuilder (); + foreach (var c in Children) { + sb.Append (c.Text); + } + return sb.ToString (); + } set { ReplaceAll (new TextNode (value ?? "")); } diff --git a/Ooui/Platform.cs b/Ooui/Platform.cs index cb6c85e..d0f3cc9 100644 --- a/Ooui/Platform.cs +++ b/Ooui/Platform.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; -using System.Linq; using System.Reflection; namespace Ooui