<commit_before>// File: _Init.cs
// Project: ROS_C-Sharp
// 
// ROS.NET
// <NAME> <<EMAIL>>
// UMass Lowell Robotics Laboratory
// 
// Reimplementation of the ROS (ros.org) ros_cpp client in C#.
// 
// Created: 09/01/2015
// Updated: 02/10/2016

#if UNITY
#define FOR_UNITY
#endif
#if ENABLE_MONO
#define FOR_UNITY
#endif

#region USINGZ

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using Messages;
using XmlRpc_Wrapper;
using m = Messages.std_msgs;
using gm = Messages.geometry_msgs;
using nm = Messages.nav_msgs;

#endregion

namespace Ros_CSharp
{
    /// <summary>
    ///     Helper class for display and/or other output of debugging/peripheral information
    /// </summary>
    [DebuggerStepThrough]
    public static class EDB
    {
        #region Delegates

        /// <summary>
        ///     This delegate and associated event can be used for logging of all output from EDB to something controlled by the
        ///     program using ROS_Sharp, such as file, or other
        /// </summary>
        public delegate void otheroutput(object o);

        #endregion

        public static event otheroutput OtherOutput;

        //does the actual writing
        private static void _writeline(object o)
        {
            if (OtherOutput != null)
                OtherOutput(o);
#if !ENABLE_MONO
            bool toDebugInstead =
#if FOR_UNITY
                true;
#else
 false;
            try
            {
                if (Console.CursorVisible) ;
            }
            catch (System.IO.IOException ex)
            {
                toDebugInstead = true;
            }
#endif //FOR_UNITY
            if (toDebugInstead)
                Debug.WriteLine(o);
            else
                Console.WriteLine(o);
#else
            UnityEngine.Debug.Log(o);
#endif //!UNITY
        }<commit_msg>EDB: Only test for console compatibility once<commit_after>// File: _Init.cs
// Project: ROS_C-Sharp
// 
// ROS.NET
// <NAME> <<EMAIL>>
// UMass Lowell Robotics Laboratory
// 
// Reimplementation of the ROS (ros.org) ros_cpp client in C#.
// 
// Created: 09/01/2015
// Updated: 02/10/2016

#if UNITY
#define FOR_UNITY
#endif
#if ENABLE_MONO
#define FOR_UNITY
#endif

#region USINGZ

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using Messages;
using XmlRpc_Wrapper;
using m = Messages.std_msgs;
using gm = Messages.geometry_msgs;
using nm = Messages.nav_msgs;

#endregion

namespace Ros_CSharp
{
    /// <summary>
    ///     Helper class for display and/or other output of debugging/peripheral information
    /// </summary>
    [DebuggerStepThrough]
    public static class EDB
    {
        #region Delegates

        /// <summary>
        ///     This delegate and associated event can be used for logging of all output from EDB to something controlled by the
        ///     program using ROS_Sharp, such as file, or other
        /// </summary>
        public delegate void otheroutput(object o);

        #endregion

        public static event otheroutput OtherOutput;

        private static bool toDebugInstead = true;
        private static bool toDebugInitialized = false;

        //does the actual writing
        private static void _writeline(object o)
        {
            if (OtherOutput != null)
                OtherOutput(o);
#if !ENABLE_MONO
#if !FOR_UNITY
            if (!toDebugInitialized)
            {
                try
                {
                    if (Console.CursorVisible)
                    {
                        toDebugInstead = false;
                    }
                }
                catch (System.IO.IOException)
                {

                }
                toDebugInitialized = true;
            }
#endif //!FOR_UNITY
            if (toDebugInstead)
                Debug.WriteLine(o);
            else
                Console.WriteLine(o);
#else
            UnityEngine.Debug.Log(o);
#endif //!UNITY
        }
{'fraction_non_alphanumeric': 0.09047044632086852, 'fraction_numerical': 0.007720144752714113, 'mean_word_length': 1.8811674774148714, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4072153', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1148, 'n_words': 350}