/// <summary> /// Deserializa os dados da stream em um objeto. /// </summary> /// <param name="stream">Stream onde os dados estão armazenados.</param> /// <param name="cacheContext"></param> /// <param name="closeStream">True caso a stream seja fechada quando a operação finalizar.</param> /// <returns></returns> public static object Deserialize(Stream stream, string cacheContext, bool closeStream) { CompactBinaryReader reader = new CompactBinaryReader(stream); object obj2 = Deserialize(reader, cacheContext, false); reader.Dispose(closeStream); return(obj2); }
/// <summary> /// Deserializes an object from the specified stream. /// </summary> /// <param name="stream">specified stream</param> /// <returns>deserialized object</returns> static public object Deserialize(Stream stream, string cacheContext, bool closeStream, MemoryManager memManager) { object obj; CompactBinaryReader reader = new CompactBinaryReader(stream); reader.Context.MemManager = memManager; obj = Deserialize(reader, cacheContext, false); reader.Dispose(closeStream); return(obj); }
/// <summary> /// Deserializes an object from the specified stream. /// </summary> /// <param name="stream">specified stream</param> /// <returns>deserialized object</returns> static public object Deserialize(Stream stream, string cacheContext, bool closeStream,MemoryManager memManager) { object obj; CompactBinaryReader reader = new CompactBinaryReader(stream); reader.Context.MemManager = memManager; obj = Deserialize(reader, cacheContext, false); reader.Dispose(closeStream); return obj; }