public override void WriteXml(System.IO.TextWriter writer, string prefix = "", NodeType typeStorage = null, string additinalAttribs = "") { Address end = Address + (uint)Size; // base.WriteXml(writer, prefix, storage, typeStorage, additinalAttribs + " Address=\"0x" + Address.ToString("x") + "\""); base.WriteXml(writer, prefix, typeStorage, additinalAttribs + " Address=\"0x" + Address.ToString("x") + "\"" + " End=\"0x" + end.ToString("x") + "\""); }
/** Convert */ public static void Convert(System.UInt64 a_in_value, System.Text.StringBuilder a_out_stringbuilder, ConvertToJsonStringOption a_option) { string t_string = a_in_value.ToString(Config.CULTURE); a_out_stringbuilder.Append(t_string); if ((a_option & ConvertToJsonStringOption.NoUnsignedNumberSuffix) == 0) { a_out_stringbuilder.Append("l"); } return; }
public override string ToString() { StringBuilder buff = new StringBuilder(); buff.Append("<p="); buff.Append(AddrString); buff.Append(",s="); buff.Append(type.ToString()); buff.Append(",k="); buff.Append(shapeKey.ToString("X")); buff.Append(",n="); buff.Append(isNativeShape.ToString()); buff.Append(">"); return(buff.ToString()); }
/** Convert */ public static void Convert(System.UInt64 a_in_value, System.Text.StringBuilder a_out_stringbuilder, ConvertToJsonStringOption a_option) { try{ string t_string = a_in_value.ToString(Config.CULTURE); a_out_stringbuilder.Append(t_string); if ((a_option & ConvertToJsonStringOption.NoUnsignedNumberSuffix) == 0) { a_out_stringbuilder.Append("l"); } return; }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } //不明。 Tool.Assert(false); return; }
public int ReadObjectSize(System.UInt64 address, PackedManagedType typeDescription) { // System.Array // Do not display its pointer-size, but the actual size of its content. if (typeDescription.isArray) { if (typeDescription.baseOrElementTypeIndex < 0 || typeDescription.baseOrElementTypeIndex >= m_Snapshot.managedTypes.Length) { var details = ""; details = "arrayRank=" + typeDescription.arrayRank + ", " + "isArray=" + typeDescription.isArray + ", " + "typeInfoAddress=" + typeDescription.typeInfoAddress.ToString("X") + ", " + "address=" + address.ToString("X") + ", " + "memoryreader=" + GetType().Name + ", " + "isValueType=" + typeDescription.isValueType; Debug.LogErrorFormat("ERROR: '{0}.baseOrElementTypeIndex' = {1} is out of range, ignoring. Details in second line\n{2}", typeDescription.name, typeDescription.baseOrElementTypeIndex, details); return(1); } var arrayLength = ReadArrayLength(address, typeDescription); var elementType = m_Snapshot.managedTypes[typeDescription.baseOrElementTypeIndex]; var elementSize = elementType.isValueType ? elementType.size : m_Snapshot.virtualMachineInformation.pointerSize; var size = m_Snapshot.virtualMachineInformation.arrayHeaderSize; size += elementSize * arrayLength; return(size); } // System.String if (typeDescription.managedTypesArrayIndex == m_Snapshot.coreTypes.systemString) { var size = m_Snapshot.virtualMachineInformation.objectHeaderSize; size += sizeof(System.Int32); // string length size += ReadStringLength(address + (uint)m_Snapshot.virtualMachineInformation.objectHeaderSize) * sizeof(char); size += 2; // two null terminators aka \0\0 return(size); } return(typeDescription.size); }
public System.String ToJSON() { return("{\"data\" : " + data.ToString() + "}"); }