Esempio n. 1
0
        internal ReleaseManifestFileEntry(
            uint fileId,
            ReleaseManifest releaseManifest,
            ReleaseManifestFileEntryDescriptor fileDescriptor,
            ReleaseManifestDirectoryEntry parent)
            : base(releaseManifest.StringTable[fileDescriptor.NameIndex])
        {
            m_id = fileId;
            m_releaseManifest = releaseManifest;
            m_descriptor      = fileDescriptor;
            m_parent          = parent;
            m_parent.m_files.Add(this);
            m_parent.AddChild(this); // TODO: Override to remove duplication

            Name = m_releaseManifest.StringTable[NameStringTableIndex];
        }
Esempio n. 2
0
        internal ReleaseManifestDirectoryEntry(
            uint directoryId,
            ReleaseManifest releaseManifest,
            ReleaseManifestDirectoryDescriptor descriptor,
            ReleaseManifestDirectoryEntry parent)
            : base(releaseManifest.StringTable[descriptor.NameIndex])
        {
            m_id = directoryId;
            m_releaseManifest = releaseManifest;
            m_descriptor      = descriptor;

            m_parent = parent;
            if (m_parent != null)
            {
                m_parent.m_directories.Add(this);
                m_parent.AddChild(this); // TODO: Override to remove duplication
            }

            m_directories = new List <ReleaseManifestDirectoryEntry>((int)descriptor.SubdirectoryCount);
            m_files       = new List <ReleaseManifestFileEntry>((int)descriptor.FileCount);

            this.Name = releaseManifest.StringTable[descriptor.NameIndex];
        }