本文整理汇总了C#中Microsoft.Cci.Pdb.BitAccess.ReadInt64方法的典型用法代码示例。如果您正苦于以下问题:C# BitAccess.ReadInt64方法的具体用法?C# BitAccess.ReadInt64怎么用?C# BitAccess.ReadInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Cci.Pdb.BitAccess
的用法示例。
在下文中一共展示了BitAccess.ReadInt64方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PdbConstant
internal PdbConstant(BitAccess bits)
{
bits.ReadUInt32(out this.token);
byte tag1;
bits.ReadUInt8(out tag1);
byte tag2;
bits.ReadUInt8(out tag2);
if (tag2 == 0)
{
this.value = tag1;
}
else if (tag2 == 0x80)
{
switch (tag1)
{
case 0x00: //sbyte
sbyte sb;
bits.ReadInt8(out sb);
this.value = sb;
break;
case 0x01: //short
short s;
bits.ReadInt16(out s);
this.value = s;
break;
case 0x02: //ushort
ushort us;
bits.ReadUInt16(out us);
this.value = us;
break;
case 0x03: //int
int i;
bits.ReadInt32(out i);
this.value = i;
break;
case 0x04: //uint
uint ui;
bits.ReadUInt32(out ui);
this.value = ui;
break;
case 0x05: //float
this.value = bits.ReadFloat();
break;
case 0x06: //double
this.value = bits.ReadDouble();
break;
case 0x09: //long
long sl;
bits.ReadInt64(out sl);
this.value = sl;
break;
case 0x0a: //ulong
ulong ul;
bits.ReadUInt64(out ul);
this.value = ul;
break;
case 0x10: //string
string str;
bits.ReadBString(out str);
this.value = str;
break;
case 0x19: //decimal
this.value = bits.ReadDecimal();
break;
default:
//TODO: error
break;
}
}
else
{
//TODO: error
}
bits.ReadCString(out name);
}
示例2: PdbConstant
internal PdbConstant(BitAccess bits)
{
bits.ReadUInt32(out this.Token);
byte tag1;
bits.ReadUInt8(out tag1);
byte tag2;
bits.ReadUInt8(out tag2);
switch (tag2)
{
case 0:
this.Value = tag1;
break;
case 0x80:
switch (tag1)
{
case 0x01: //short
short s;
bits.ReadInt16(out s);
this.Value = s;
break;
case 0x02: //ushort
ushort us;
bits.ReadUInt16(out us);
this.Value = us;
break;
case 0x03: //int
int i;
bits.ReadInt32(out i);
this.Value = i;
break;
case 0x04: //uint
uint ui;
bits.ReadUInt32(out ui);
this.Value = ui;
break;
case 0x05: //float
this.Value = bits.ReadFloat();
break;
case 0x06: //double
this.Value = bits.ReadDouble();
break;
case 0x09: //long
long sl;
bits.ReadInt64(out sl);
this.Value = sl;
break;
case 0x0a: //ulong
ulong ul;
bits.ReadUInt64(out ul);
this.Value = ul;
break;
case 0x10: //string
string str;
bits.ReadBString(out str);
this.Value = str;
break;
case 0x19: //decimal
this.Value = bits.ReadDecimal();
break;
}
break;
}
bits.ReadCString(out this.Name);
}