本文整理汇总了C#中Microsoft.Cci.Pdb.BitAccess.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# BitAccess.ReadBytes方法的具体用法?C# BitAccess.ReadBytes怎么用?C# BitAccess.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Cci.Pdb.BitAccess
的用法示例。
在下文中一共展示了BitAccess.ReadBytes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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
}
示例2: LoadInjectedSourceInformation
static void LoadInjectedSourceInformation(BitAccess bits, out Guid doctype, out Guid language, out Guid vendor, out Guid checksumAlgo, out byte[] checksum) {
int checksumSize;
int injectedSourceSize;
checksum = null;
bits.ReadGuid(out language);
bits.ReadGuid(out vendor);
bits.ReadGuid(out doctype);
bits.ReadGuid(out checksumAlgo);
bits.ReadInt32(out checksumSize);
bits.ReadInt32(out injectedSourceSize);
if (checksumSize > 0) {
checksum = new byte[checksumSize];
bits.ReadBytes(checksum);
}
}
示例3: PdbFileHeader
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
if (Magic != MAGIC) {
throw new InvalidOperationException("Magic is wrong.");
}
int directoryPages = ((((directorySize + pageSize - 1) / pageSize) * 4) + pageSize - 1) / pageSize;
this.directoryRoot = new int[directoryPages];
bits.FillBuffer(reader, directoryPages * 4);
bits.ReadInt32(this.directoryRoot);
}