public void AddDirectory(AssemblyDirectory dir)
 {
     _directories.Add(dir.Name.GetName(), dir);
 }
        void parse()
        {
            var assembly = System.Reflection.Assembly.ReflectionOnlyLoadFrom(Name.GetPath());
            var names = assembly.GetManifestResourceNames();

            foreach (var name in names)
            {
                Trace.WriteLine("Reading Entry: " + name);

                var path = name.Split('.');
                if (path.Length == 1) //a file
                {
                    using (var str = assembly.GetManifestResourceStream(name))
                    {
                        var data = str.ReadToEnd();
                        Trace.WriteLine("Read: " + data.Length + " bytes");
                        var fn = FileName.GetFileName(Name, path[0]);
                        _files.Add(path[0], new AssemblyFile(fn, data));
                    }
                }
                else
                {
                    var first = path.First();
                    var parent = new AssemblyDirectory(DirectoryName.GetDirectoryName(Name, first), this);
                    _directories.Add(first, parent);
                    var rest = path.Skip(1).Take(path.Length - 3); //because '.' are the path seperator
                    var queue = new Queue<string>(rest);

                    foreach (var item in queue)
                    {
                        var dir = new AssemblyDirectory(DirectoryName.GetDirectoryName(parent.Name, item), parent);
                        parent.AddDirectory(dir);
                        parent = dir;
                    }

                    var fileParts = path.Skip(1 + (path.Length - 3)).ToArray();

                    var file = fileParts[0] + "." + fileParts[1];

                    using (var str = assembly.GetManifestResourceStream(name))
                    {
                        var data = str.ReadToEnd();
                        Trace.WriteLine("Read: " + data.Length + " bytes");
                        //needs to be added
                        var zipfile = new AssemblyFile(FileName.GetFileName(parent.Name, file), data);
                        parent.AddFile(file, zipfile);
                    }
                }

                _parse = () => { };
            }
        }