/// <summary>
/// Log the command / response to the debug stream
/// </summary>
/// <param name="commandCode"></param>
/// <param name="theStruct"></param>
/// <param name="outOrIn"></param>
private void Log(TpmCc commandCode, TpmStructureBase theStruct, int outOrIn)
{
if (!CommandLogging)
return;
Debug.WriteLine("COMMAND " + Enum.GetName(typeof (TpmCc), commandCode));
switch (outOrIn)
{
case 0:
Debug.WriteLine("COMMAND STRUCTURE");
break;
case 1:
Debug.WriteLine("RESPONSE STRUCTURE");
break;
}
string ss = theStruct.ToString();
Debug.WriteLine(ss);
}