public void ShouldConvertFlags() { short flags = 0b01101000; char[] flagsAsChars = HeaderFlyweight.FlagsToChars(flags); Assert.That(flagsAsChars, Is.EqualTo("01101000")); }
public void ShouldAppendFlags() { short flags = 0b01100000; StringBuilder builder = new StringBuilder(); HeaderFlyweight.AppendFlagsAsChars(flags, builder); Assert.That(builder.ToString(), Is.EqualTo("01100000")); }
/// <summary> /// Generic error handler that just prints message to stdout. /// </summary> /// <param name="channel"> for the error </param> /// <param name="streamId"> for the error </param> /// <param name="sessionId"> for the error, if source </param> /// <param name="message"> indicating what the error was </param> /// <param name="cause"> of the error </param> public static void PrintError(string channel, int streamId, int sessionId, string message, HeaderFlyweight cause) { Console.WriteLine(message); }