Exemple #1
0
        public string AppendIf(bool condition, string msg)
        {
            if (msg == null || !condition)
            {
                return(msg);
            }

            ChoTrace.WriteLine(msg);
            return(msg);
        }
Exemple #2
0
        public static void WriteNewLine()
        {
            IChoProfile profile = GetDefaultContext(new StackFrame(1));

            if (profile != null)
            {
                profile.AppendIf(true, Environment.NewLine);
            }
            else
            {
                ChoTrace.WriteLine(Environment.NewLine);
            }
        }
Exemple #3
0
        public static void WriteSeparator()
        {
            IChoProfile profile = GetDefaultContext(new StackFrame(1));

            if (profile != null)
            {
                profile.AppendLineIf(true, ChoTrace.SEPARATOR);
            }
            else
            {
                ChoTrace.WriteLine(ChoTrace.SEPARATOR);
            }
        }
Exemple #4
0
        public static void WriteLine(string format, params object[] args)
        {
            IChoProfile profile = GetDefaultContext(new StackFrame(1));

            if (profile != null)
            {
                profile.AppendLineIf(true, String.Format(format, args));
            }
            else
            {
                ChoTrace.WriteLine(String.Format(format, args));
            }
        }
Exemple #5
0
        public static void WriteLine(string msg)
        {
            IChoProfile profile = GetDefaultContext(new StackFrame(1));

            if (profile != null)
            {
                profile.AppendLineIf(true, msg);
            }
            else
            {
                ChoTrace.WriteLine(msg);
            }
        }
 public void Write(string msg, object tag)
 {
     ChoTrace.WriteLine(msg);
 }