public static void WriteTrace( TextWriter writer, ITrace trace, TraceLevel level = TraceLevel.Verbose, AsciiType asciiType = AsciiType.Default) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } if (trace == null) { throw new ArgumentNullException(nameof(trace)); } if ((int)trace.Level > (int)level) { return; } AsciiTreeCharacters asciiTreeCharacter = asciiTreeCharactersMap[asciiType]; AsciiTreeIndents asciiTreeIndents = asciiTreeIndentsMap[asciiType]; writer.WriteLine(asciiTreeCharacter.Root); WriteTraceRecursive(writer, trace, level, asciiTreeIndents, isLastChild: true); }
public static string TraceToText( ITrace trace, TraceLevel level = TraceLevel.Verbose, AsciiType asciiType = AsciiType.Default) { StringWriter writer = new StringWriter(); WriteTrace(writer, trace, level, asciiType); return(writer.ToString()); }
public void Implicit_String_Cast() { // arrange string expected = "The quick brown fox jumps over the lazy dog."; // act AsciiType actual = expected; // assert Assert.AreEqual(expected, (string)actual); }
public static void WriteTrace( TextWriter writer, ITrace trace, TraceLevel level = TraceLevel.Verbose, AsciiType asciiType = AsciiType.Default) { TraceTextWriter.WriteTrace( writer, trace, level, asciiType); }
public void Operator_NotEqualTo() { // arrange var value = "The quick brown fox jumps over the lazy dog."; AsciiType type = value; // act bool actual = type != value; // assert Assert.IsFalse(actual); }
public void CassandraType_Cast() { // arranage string expected = "The quick brown fox jumps over the lazy dog."; AsciiType actualType = expected; // act CassandraType actual = actualType; // assert Assert.AreEqual(expected, (string)actual); }
public static void AddAscii(this DynamicCompositeType type, AsciiType value) { type.Add(value); }