Beispiel #1
0
        public static string asDebugString <A>(this A a)
        {
            var enumerable = a as IEnumerable;

            // ReSharper disable once InvokeAsExtensionMethod
            return(enumerable != null
        ? IEnumerableExts.asDebugString(enumerable)
        : a == null ? "null" : a.ToString());
        }
Beispiel #2
0
        public static string asDebugString <A>(this A a)
        {
            // strings are enumrables, but we don't want to look at them like that...
            if (a is string)
            {
                return($"'{a}'");
            }
            var enumerable = a as IEnumerable;

            // ReSharper disable once InvokeAsExtensionMethod
            return(enumerable != null
        ? IEnumerableExts.asDebugString(enumerable)
        : a == null ? "null" : a.ToString());
        }