public static void VisitDynamic( HRONObject hronObject, IHRONVisitor visitor ) { if (hronObject == null) { return; } hronObject.Visit(visitor); }
public static string DynamicAsString( HRONObject hronObject ) { if (hronObject == null) { return(""); } var v = new HRONWriterVisitor(); VisitDynamic(hronObject, v); return(v.Value); }
public static bool TryParseDynamic( int maxErrorCount, IEnumerable <SubString> lines, out HRONObject hronObject, out HRONDynamicParseError[] errors ) { hronObject = null; errors = Array <HRONDynamicParseError> .Empty; var visitor = new HRONDynamicBuilderVisitor(maxErrorCount); Parse(maxErrorCount, lines, visitor); if (visitor.Errors.Count > 0) { errors = visitor.Errors.ToArray(); return(false); } hronObject = new HRONObject(visitor.Top.Pairs.ToArray()); return(true); }
public static bool TryParseDynamic( int maxErrorCount, IEnumerable<SubString> lines, out HRONObject hronObject, out HRONDynamicParseError[] errors ) { hronObject = null; errors = Array<HRONDynamicParseError>.Empty; var visitor = new HRONDynamicBuilderVisitor(maxErrorCount); Parse(maxErrorCount, lines, visitor); if (visitor.Errors.Count > 0) { errors = visitor.Errors.ToArray(); return false; } hronObject = new HRONObject(visitor.Top.Pairs.ToArray()); return true; }
public static string DynamicAsString( HRONObject hronObject ) { if (hronObject == null) { return ""; } var v = new HRONWriterVisitor(); VisitDynamic(hronObject, v); return v.Value; }