Пример #1
0
        public SerializedFile ReadFile(IFileCollection collection, IAssemblyManager manager)
        {
            SerializedFile file = new SerializedFile(collection, manager, this);

            using (PartialStream stream = new PartialStream(m_stream, m_offset, m_size))
            {
                EndianType endianess = Header.SwapEndianess ? EndianType.BigEndian : EndianType.LittleEndian;
                using (EndianReader reader = new EndianReader(stream, endianess, stream.Position))
                {
                    file.Read(reader);
                }
            }
            return(file);
        }
Пример #2
0
 public static SerializedFile Read(Stream stream, Parameters pars)
 {
     SerializedFile file = new SerializedFile(pars.FileCollection, pars.AssemblyManager, pars.FilePath, pars.Name, pars.Flags);
     file.Read(stream, pars.DependencyCallback);
     return file;
 }