本文整理汇总了C#中Microsoft.Cci.Pdb.BitAccess.Append方法的典型用法代码示例。如果您正苦于以下问题:C# BitAccess.Append方法的具体用法?C# BitAccess.Append怎么用?C# BitAccess.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Cci.Pdb.BitAccess
的用法示例。
在下文中一共展示了BitAccess.Append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MsfDirectory
internal MsfDirectory(PdbReader reader, PdbFileHeader head, BitAccess bits)
{
int pages = reader.PagesFromSize(head.directorySize);
// 0..n in page of directory pages.
bits.MinCapacity(head.directorySize);
int directoryRootPages = head.directoryRoot.Length;
int pagesPerPage = head.pageSize / 4;
int pagesToGo = pages;
for (int i = 0; i < directoryRootPages; i++)
{
int pagesInThisPage = pagesToGo <= pagesPerPage ? pagesToGo : pagesPerPage;
reader.Seek(head.directoryRoot[i], 0);
bits.Append(reader.reader, pagesInThisPage * 4);
pagesToGo -= pagesInThisPage;
}
bits.Position = 0;
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]));
}
}
}