コード例 #1
0
        //public static void WriteLine(string message)
        //{
        //    FinalWrite(message, false);
        //}

        public static void WriteLine(object[] parameters, bool oneItemOneRow = false)
        {
            using (TextWriter textWriter = new StringWriter())
            {
                for (int i = 0; i < parameters.Length; i++)
                {
                    _dumper.Dump(parameters[i], textWriter);

                    if (oneItemOneRow && i + 1 < parameters.Length)
                    {
                        textWriter.WriteLine();
                    }
                }

                bool isMultiline = oneItemOneRow && (parameters.Length > 1 || (parameters.Length == 1 && parameters[0] is IEnumerable));

                FinalWrite(textWriter.ToString(), isMultiline);
            }
        }
コード例 #2
0
        public static T Dump <T>(this T value, int maximumDepth)
        {
            Dumper.Dump(value, maximumDepth);

            return(value);
        }