private void EnterText(string line) { int equalsIndex = line.IndexOf('='); if (equalsIndex < 0) { throw RuntimeFailure.PropertyDeclarationMissingKey(); } string newKey = null; string newValue = null; if (equalsIndex == line.Length - 1) { newKey = line.Substring(0, line.Length - 1); newValue = string.Empty; } else { newKey = line.Substring(0, equalsIndex); newValue = line.Substring(equalsIndex + 1).Trim(); } _key = newKey; _value = StringUnescaper.Unescape(newValue); _nodeKind = PropertyNodeKind.Property; }