internal static ODocument Deserialize(ORID orid, int version, ORecordType type, short classId, byte[] rawRecord) { ODocument document = new ODocument(); document.ORID = orid; document.OVersion = version; document.OType = type; document.OClassId = classId; string recordString = BinarySerializer.ToString(rawRecord).Trim(); int atIndex = recordString.IndexOf('@'); int colonIndex = recordString.IndexOf(':'); int index = 0; // parse class name if ((atIndex != -1) && (atIndex < colonIndex)) { document.OClassName = recordString.Substring(0, atIndex); index = atIndex + 1; } // start document parsing with first field name do { index = ParseFieldName(index, recordString, document); }while (index < recordString.Length); return(document); }
internal ODocument Deserialize(ORID orid, int version, ORecordType type, short classId, byte[] rawRecord) { ODocument document = new ODocument(); document.ORID = orid; document.OVersion = version; document.OType = type; document.OClassId = classId; string recordString = BinarySerializer.ToString(rawRecord).Trim(); return(Deserialize(recordString, document)); }
public ODocument Deserialize(byte[] rawRecord, ODocument document) { string recordString = BinarySerializer.ToString(rawRecord).Trim(); return(Deserialize(recordString, document)); }