/// <summary> /// Deserializes an object from a FlatBuffer formatted byte array /// </summary> /// <param name="type">The type of the object to deserialize</param> /// <param name="buffer">Buffer containing FlatBuffer data</param> /// <returns>Deserialized object of type T</returns> public static object DeserializeObject(Type type, byte[] buffer) { var serializer = new FlatBuffersSerializer(); return(serializer.Deserialize(type, buffer, 0, buffer.Length)); }
/// <summary> /// Deserializes an object from a FlatBuffer formatted byte array /// </summary> /// <param name="type">The type of the object to deserialize</param> /// <param name="buffer">Buffer containing FlatBuffer data</param> /// <param name="offset">Offset into the buffer to start reading from</param> /// <param name="count">The number of available bytes to read</param> /// <returns>Deserialized object of type T</returns> public static object DeserializeObject(Type type, byte[] buffer, int offset, int count) { var serializer = new FlatBuffersSerializer(); return(serializer.Deserialize(type, buffer, offset, count)); }