public string ToString(IMessageSerializable objectToPrint, bool includeBytes, int indentLevel = 0, string separator = null, string bytesSeparator = null, bool putBytesAfter = false, ToStringFormatProperties formatProperties = null) { MessageSerializedClassInfo classInfo = GetClassInfo(objectToPrint.GetType()); string stringResult = string.Empty; if ((includeBytes && (putBytesAfter == false))) { stringResult += ArrayOps.GetHexStringFromByteArray(classInfo.Serializer.Serialize(objectToPrint), bytesSeparator) + separator; } stringResult += classInfo.Serializer.ToString( objectToPrint, indentLevel, formatProperties ?? ToStringFormatProperties.Default); if ((includeBytes && putBytesAfter)) { stringResult += separator + ArrayOps.GetHexStringFromByteArray(classInfo.Serializer.Serialize(objectToPrint), bytesSeparator); } return(stringResult); }
public string ToString(IMessageSerializable objectToPrint, int indentLevel, ToStringFormatProperties formatProperties = null) { return(ToString(objectToPrint, true, indentLevel, null, null, false, formatProperties)); }
public string GetClassInfoString(IMessageSerializable objectForInfo, int indentLevel = 0) { MessageSerializedClassInfo classInfo = GetClassInfo(objectForInfo.GetType()); return(classInfo.ToString(indentLevel)); }