Ejemplo n.º 1
0
        public System.IO.Stream OpenPackfileFile(string name, Packfiles.IPackfile packfile)
        {
            foreach (Packfiles.IPackfileEntry entry in packfile.Files)
            {
                if (entry.Name == name)
                {
                    return(entry.GetStream());
                }
            }

            throw new FileNotFoundException("Could not find the requested file in the supplied packfile.", name);
        }
Ejemplo n.º 2
0
        public System.IO.Stream OpenPackfileFile(string name, Packfiles.IPackfile packfile)
        {
            foreach (Packfiles.IPackfileEntry entry in packfile.Files)
            {
                if (entry.Name == name)
                {
                    return(entry.GetStream());
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
        public System.IO.Stream OpenPackfileFile(string name, string packfile)
        {
            using (Packfiles.IPackfile pf = OpenPackfile(packfile))
            {
                foreach (Packfiles.IPackfileEntry entry in pf.Files)
                {
                    if (entry.Name == name)
                    {
                        return(entry.GetStream());
                    }
                }

                throw new FileNotFoundException("Could not find the requested file in packfile: " + packfile, name);
            }
        }
Ejemplo n.º 4
0
        public System.IO.Stream OpenPackfileFile(string name, string packfile)
        {
            using (Packfiles.IPackfile pf = OpenPackfile(packfile))
            {
                if (pf == null)
                {
                    return(null);
                }

                foreach (Packfiles.IPackfileEntry entry in pf.Files)
                {
                    if (entry.Name == name)
                    {
                        return(entry.GetStream());
                    }
                }

                return(null);
            }
        }