当前位置: 首页>>代码示例>>C#>>正文


C# BitAccess.FillBuffer方法代码示例

本文整理汇总了C#中Microsoft.Cci.Pdb.BitAccess.FillBuffer方法的典型用法代码示例。如果您正苦于以下问题:C# BitAccess.FillBuffer方法的具体用法?C# BitAccess.FillBuffer怎么用?C# BitAccess.FillBuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Cci.Pdb.BitAccess的用法示例。


在下文中一共展示了BitAccess.FillBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MsfDirectory

    internal MsfDirectory(PdbReader reader, PdbFileHeader head, BitAccess bits) {
      bits.MinCapacity(head.directorySize);
      int pages = reader.PagesFromSize(head.directorySize);

      // 0..n in page of directory pages.
      reader.Seek(head.directoryRoot, 0);
      bits.FillBuffer(reader.reader, pages * 4);

      DataStream stream = new DataStream(head.directorySize, bits, pages);
      bits.MinCapacity(head.directorySize);
      stream.Read(reader, bits);

      // 0..3 in directory pages
      int count;
      bits.ReadInt32(out count);

      // 4..n
      int[] sizes = new int[count];
      bits.ReadInt32(sizes);

      // n..m
      streams = new DataStream[count];
      for (int i = 0; i < count; i++) {
        if (sizes[i] <= 0) {
          streams[i] = new DataStream();
        } else {
          streams[i] = new DataStream(sizes[i], bits,
                                      reader.PagesFromSize(sizes[i]));
        }
      }
    }
开发者ID:pusp,项目名称:o2platform,代码行数:31,代码来源:MsfDirectory.cs

示例2: PdbFileHeader

    //internal PdbFileHeader(int pageSize) {
    //  this.magic = new byte[32] {
    //            0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, // "Microsof"
    //            0x74, 0x20, 0x43, 0x2F, 0x43, 0x2B, 0x2B, 0x20, // "t C/C++ "
    //            0x4D, 0x53, 0x46, 0x20, 0x37, 0x2E, 0x30, 0x30, // "MSF 7.00"
    //            0x0D, 0x0A, 0x1A, 0x44, 0x53, 0x00, 0x00, 0x00  // "^^^DS^^^"
    //        };
    //  this.pageSize = pageSize;
    //}

    internal PdbFileHeader(Stream reader, BitAccess bits) {
      bits.MinCapacity(56);
      reader.Seek(0, SeekOrigin.Begin);
      bits.FillBuffer(reader, 52);

      this.magic = new byte[32];
      bits.ReadBytes(this.magic);                 //   0..31
      bits.ReadInt32(out this.pageSize);          //  32..35
      bits.ReadInt32(out this.freePageMap);       //  36..39
      bits.ReadInt32(out this.pagesUsed);         //  40..43
      bits.ReadInt32(out this.directorySize);     //  44..47
      bits.ReadInt32(out this.zero);              //  48..51

      int directoryPages = ((((directorySize + pageSize - 1) / pageSize) * 4) + pageSize - 1) / pageSize;
      this.directoryRoot = new int[directoryPages];
      bits.FillBuffer(reader, directoryPages * 4);
      bits.ReadInt32(this.directoryRoot);
    }
开发者ID:Refresh06,项目名称:visualmutator,代码行数:28,代码来源:PdbFileHeader.cs

示例3: PdbFileHeader

        internal PdbFileHeader(Stream reader, BitAccess bits)
        {
            bits.MinCapacity(56);
            reader.Seek(0, SeekOrigin.Begin);
            bits.FillBuffer(reader, 56);

            this.magic = new byte[32];
            bits.ReadBytes(this.magic);                 //   0..31
            bits.ReadInt32(out this.PageSize);          //  32..35
            bits.ReadInt32(out this.FreePageMap);       //  36..39
            bits.ReadInt32(out this.PagesUsed);         //  40..43
            bits.ReadInt32(out this.DirectorySize);     //  44..47
            bits.ReadInt32(out this.Zero);              //  48..51
            bits.ReadInt32(out this.DirectoryRoot);     //  52..55
        }
开发者ID:RoqueDeicide,项目名称:CryCIL,代码行数:15,代码来源:PdbFileHeader.cs


注:本文中的Microsoft.Cci.Pdb.BitAccess.FillBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。