Example #1
0
        internal void MaybeDisposeBuffer()
        {
            // Do not dispose while deserializing!
            // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations!
            if (_Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0)
            {
                return;
            }

            _Buffer.DisposeBuffer();
            _Buffer = null;
        }
Example #2
0
        private void InitBuffer()
        {
            var buff = new byte[ExportTable.SerialSize];

            Package.Stream.Seek(ExportTable.SerialOffset, SeekOrigin.Begin);
            Package.Stream.Read(buff, 0, ExportTable.SerialSize);
            if (Package.Stream.BigEndianCode)
            {
                Array.Reverse(buff);
            }
            _Buffer = new UObjectStream(Package.Stream, buff);
        }
Example #3
0
        private void InitBuffer()
        {
            //Console.WriteLine( "Init buffer for {0}", (string)this );
            var buff = new byte[ExportTable.SerialSize];

            Package.Stream.Seek(ExportTable.SerialOffset, SeekOrigin.Begin);
            Package.Stream.Read(buff, 0, ExportTable.SerialSize);
            if (Package.Stream.BigEndianCode)
            {
                Array.Reverse(buff);
            }
            _Buffer = new UObjectStream(Package.Stream, buff);
        }
Example #4
0
        internal void MaybeDisposeBuffer()
        {
            //Console.WriteLine( "Disposing buffer for {0}", (string)this );

            // Do not dispose while deserializing!
            // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations!
            if (_Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0)
            {
                return;
            }

            _Buffer.DisposeBuffer();
            _Buffer = null;
            //Console.WriteLine( "Disposed" );
        }
Example #5
0
        internal void MaybeDisposeBuffer()
        {
            //Console.WriteLine( "Disposing buffer for {0}", (string)this );

            // Do not dispose while deserializing!
            // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations!
            if( _Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0 )
                return;

            _Buffer.DisposeBuffer();
            _Buffer = null;
            //Console.WriteLine( "Disposed" );
        }
Example #6
0
 private void InitBuffer()
 {
     //Console.WriteLine( "Init buffer for {0}", (string)this );
     var buff = new byte[ExportTable.SerialSize];
     Package.Stream.Seek( ExportTable.SerialOffset, SeekOrigin.Begin );
     Package.Stream.Read( buff, 0, ExportTable.SerialSize );
     if( Package.Stream.BigEndianCode )
     {
         Array.Reverse( buff );
     }
     _Buffer = new UObjectStream( Package.Stream, buff );
 }