BN089-BS开发框架MVC4版/source20131023/Zephyr.Net/Zephyr.Utils/Document/Excel/ExcelLibrary/Office/CompoundDocumentFormat/MasterSectorAllocation.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;

namespace Zephyr.Utils.ExcelLibrary.CompoundDocumentFormat
{
    /// <summary>
    /// The master sector allocation table (MSAT) is an array of SecIDs of all sectors
    /// used by the sector allocation table (SAT).
    /// </summary>
    public class MasterSectorAllocation
    {
        CompoundDocument Document;

        int NumberOfSecIDs;

        int CurrentMSATSector;

        int SecIDCapacity;

        List<Int32> MasterSectorAllocationTable;

        public MasterSectorAllocation(CompoundDocument document)
        {
            this.Document = document;
            this.NumberOfSecIDs = document.Header.NumberOfSATSectors;
            this.CurrentMSATSector = document.Header.FirstSectorIDofMasterSectorAllocationTable;
            this.SecIDCapacity = document.SectorSize / 4 - 1;
            InitializeMasterSectorAllocationTable();
        }

        private void InitializeMasterSectorAllocationTable()
        {
            this.MasterSectorAllocationTable = new List<int>(NumberOfSecIDs);
            SelectSIDs(Document.Header.MasterSectorAllocationTable);
            int msid = Document.Header.FirstSectorIDofMasterSectorAllocationTable;
            while (msid != SID.EOC)
            {
                CurrentMSATSector = msid;
                int[] SIDs = Document.ReadSectorDataAsIntegers(msid);
                SelectSIDs(SIDs);
                msid = SIDs[SIDs.Length - 1];
            }
        }

        private void SelectSIDs(int[] SIDs)
        {
            for (int i = 0; i < SIDs.Length; i++)
            {
                int sid = SIDs[i];
                if (MasterSectorAllocationTable.Count < NumberOfSecIDs)
                {
                    MasterSectorAllocationTable.Add(sid);
                }
                else
                {
                    break;
                }
            }
        }
后面还有 72 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。