Exemple #1
0
        public void ReadSerializedFile(Stream stream, string filePath, string fileName)
        {
            SerializedFile file = new SerializedFile(this, filePath, fileName);

            file.Read(stream, OnRequestDependency);
            AddSerializedFile(file);
        }
        public void ReadSerializedFile(Stream stream, string filePath, string fileName, TransferInstructionFlags flags)
        {
            SerializedFile file = new SerializedFile(this, filePath, fileName, flags);

            file.Read(stream, OnRequestDependency);
            AddSerializedFile(file);
        }
        internal void ReadSerializedFile(Stream stream, string fileName, string filePath, Action <string> requestDependencyCallback)
        {
            SerializedFile file = new SerializedFile(this, fileName, filePath);

            file.Read(stream, requestDependencyCallback);
            AddSerializedFile(file);
        }
        internal void ReadSerializedFile(Stream stream, string filePath, string fileName, Action <string> dependencyCallback)
        {
            SerializedFile.Parameters pars = new SerializedFile.Parameters()
            {
                FileCollection     = this,
                AssemblyManager    = AssemblyManager,
                FilePath           = filePath,
                Name               = fileName,
                DependencyCallback = dependencyCallback,
            };
            SerializedFile file = SerializedFile.Read(stream, pars);

            AddSerializedFile(file);
        }
Exemple #5
0
        public SerializedFile ReadSerializedFile(IFileCollection collection, Action <string> requestDependencyCallback)
        {
            SerializedFile file = new SerializedFile(collection, m_filePath, Name);

            m_stream.Position = m_offset;
            file.Read(m_stream, requestDependencyCallback);
            long read = m_stream.Position - m_offset;

            if (read != m_size)
            {
                //throw new System.Exception($"Read {read} but expected {m_length}");
            }
            return(file);
        }
        public SerializedFile ReadSerializedFile(IAssetCollection collection, string filePath)
        {
            SerializedFile file = new SerializedFile(collection, filePath, Name);

            m_stream.Position = m_offset;
            file.Read(m_stream);
            long read = m_stream.Position - m_offset;

            if (read != m_size)
            {
                //throw new System.Exception($"Read {read} but expected {m_length}");
            }
            return(file);
        }