Exemple #1
0
            public static HashSet <Obj> MultilineObjs(Obj obj, int maxLineLen)
            {
                HashSet <Obj> multilineObjs = new HashSet <Obj>(new IdentityEqualityComparer <Obj>());
                Multiliner    multiliner    = new Multiliner(obj, false, maxLineLen, multilineObjs);

                return(multilineObjs);
            }
Exemple #2
0
        public static void Print(Obj obj, DataWriter writer, int maxLineLen)
        {
            HashSet <Obj> multilineObjs = Multiliner.MultilineObjs(obj, maxLineLen);
            ObjPrinter    printer       = new ObjPrinter(writer, multilineObjs);

            obj.Visit(printer);
            writer.Flush();
        }
Exemple #3
0
            public static bool IsMultiline(Obj obj, int maxLineLen)
            {
                Multiliner multiliner = new Multiliner(obj, true, maxLineLen, null);

                return(multiliner.done);
            }
Exemple #4
0
 public static bool PrintSizeFits(Obj obj, int maxSize)
 {
     return(!Multiliner.IsMultiline(obj, maxSize));
 }