internal abstract string ToString(RecursionLevel level);
/// <summary> /// When implemented, recursively enumerates all the nodes from the document, starting on the current node. /// If <see cref="RecursionLevel.Maximum"/> is reached, a <see cref="MaximumRecursionLevelReachedException"/> is thrown /// instead of continuing and crashing with a <see cref="StackOverflowException"/>. /// </summary> internal abstract IEnumerable<YamlNode> SafeAllNodes(RecursionLevel level);
public override string ToString() { var level = new RecursionLevel(MaximumRecursionLevel); return ToString(level); }
/// <summary> /// Returns a <see cref="System.String"/> that represents this instance. /// </summary> /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> internal override string ToString(RecursionLevel level) { return Value; }
/// <summary> /// Recursively enumerates all the nodes from the document, starting on the current node, /// and throwing <see cref="MaximumRecursionLevelReachedException"/> /// if <see cref="RecursionLevel.Maximum"/> is reached. /// </summary> internal override IEnumerable<YamlNode> SafeAllNodes(RecursionLevel level) { yield return this; }
/// <summary> /// Returns a <see cref="System.String"/> that represents this instance. /// </summary> /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> internal override string ToString(RecursionLevel level) { return "*" + Anchor; }