本文整理汇总了C#中CLIFile类的典型用法代码示例。如果您正苦于以下问题:C# CLIFile类的具体用法?C# CLIFile怎么用?C# CLIFile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CLIFile类属于命名空间,在下文中一共展示了CLIFile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SigRetType
public SigRetType(CLIFile pCLIFile, byte[] pSignature, ref int pCursor)
{
CLIFile = pCLIFile;
while (pSignature[pCursor] == (byte)SigElementType.CustomModifier_Required ||
pSignature[pCursor] == (byte)SigElementType.CustomModifier_Optional)
{
Mods.Add(new SigCustomMod(CLIFile, pSignature, ref pCursor));
}
if (pSignature[pCursor] == (byte)SigElementType.TypedByReference)
{
TypedByRef = true;
++pCursor;
return;
}
if (pSignature[pCursor] == (byte)SigElementType.Void)
{
Void = true;
++pCursor;
return;
}
if (pSignature[pCursor] == (byte)SigElementType.ByReference)
{
ByRef = true;
++pCursor;
}
Type = new SigType(CLIFile, pSignature, ref pCursor);
}
示例2: SigLocalVar
public SigLocalVar(CLIFile pCLIFile, byte[] pSignature, ref int pCursor)
{
CLIFile = pCLIFile;
if (pSignature[pCursor] == (byte)SigElementType.TypedByReference)
{
TypedByRef = true;
++pCursor;
}
else
{
while (pSignature[pCursor] == (byte)SigElementType.CustomModifier_Required ||
pSignature[pCursor] == (byte)SigElementType.CustomModifier_Optional)
{
Mods.Add(new SigCustomMod(CLIFile, pSignature, ref pCursor));
}
if (pSignature[pCursor] == (byte)SigElementType.Pinned)
{
IsPinned = true;
++pCursor;
}
if (pSignature[pCursor] == (byte)SigElementType.ByReference)
{
ByRef = true;
++pCursor;
}
Type = new SigType(CLIFile, pSignature, ref pCursor);
}
}
示例3: SigCustomMod
public SigCustomMod(CLIFile pCLIFile, byte[] pSignature, ref int pCursor)
{
CLIFile = pCLIFile;
Optional = pSignature[pCursor++] == (byte)SigElementType.CustomModifier_Optional;
TypeDefOrRefOrSpecToken = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
}
示例4: LoadData
private void LoadData(CLIFile pFile)
{
Offset = pFile.ReadUInt32();
Flags = (ManifestResourceAttributes)pFile.ReadUInt32();
Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
Implementation.LoadData(pFile);
}
示例5: LoadData
private void LoadData(CLIFile pFile)
{
Number = pFile.ReadUInt16();
Flags = pFile.ReadUInt16();
Owner.LoadData(pFile);
Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
}
示例6: LoadData
private void LoadData(CLIFile pFile)
{
Number = pFile.ReadUInt16();
Flags = (GenericParamAttributes)pFile.ReadUInt16();
Owner.LoadData(pFile);
Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
}
示例7: LinkData
private void LinkData(CLIFile pFile)
{
int cursor = 0;
if (Signature[0] == 0x06) ExpandedFieldSignature = new FieldSig(pFile, Signature, ref cursor);
else if (Signature[0] == 0x07) ExpandedLocalVarSignature = new LocalVarSig(pFile, Signature, ref cursor);
else ExpandedMethodSignature = new MethodSig(pFile, Signature, ref cursor);
}
示例8: LoadData
private void LoadData(CLIFile pFile)
{
Offset = pFile.ReadUInt32();
Flags = pFile.ReadUInt32();
Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
Implementation.LoadData(pFile);
}
示例9: MethodSig
public MethodSig(CLIFile pCLIFile, byte[] pSignature, ref int pCursor)
{
CLIFile = pCLIFile;
byte callingConvention = pSignature[pCursor++];
HasThis = (callingConvention & CallingConvention.HasThis) != 0;
ExplicitThis = (callingConvention & CallingConvention.ExplicitThis) != 0;
if ((callingConvention & CallingConvention.HasThis) != 0) callingConvention ^= CallingConvention.HasThis;
if ((callingConvention & CallingConvention.ExplicitThis) != 0) callingConvention ^= CallingConvention.ExplicitThis;
Default = callingConvention == CallingConvention.Default;
CCall = callingConvention == CallingConvention.CCall;
STDCall = callingConvention == CallingConvention.STDCall;
ThisCall = callingConvention == CallingConvention.ThisCall;
FastCall = callingConvention == CallingConvention.FastCall;
VarArg = callingConvention == CallingConvention.VarArgs;
Generic = callingConvention == CallingConvention.Generic;
if (Generic) GenParamCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
uint paramCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
Params = new List<SigParam>((int)paramCount);
RetType = new SigRetType(CLIFile, pSignature, ref pCursor);
if (paramCount > 0)
{
for (uint paramIndex = 0; paramIndex < paramCount; ++paramIndex)
{
if (pSignature[pCursor] == (byte)SigElementType.Sentinel)
{
HasSentinel = true;
SentinelIndex = paramIndex;
++pCursor;
}
Params.Add(new SigParam(CLIFile, pSignature, ref pCursor));
}
}
}
示例10: LoadData
private void LoadData(CLIFile pFile)
{
Type = (SigElementType)pFile.ReadByte();
pFile.ReadByte();
Parent.LoadData(pFile);
Value = pFile.ReadBlobHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Blob32Bit));
}
示例11: LoadData
private void LoadData(CLIFile pFile)
{
int genericParamIndex = 0;
if (pFile.GenericParamTable.Length >= 0xFFFF) genericParamIndex = pFile.ReadInt32() - 1;
else genericParamIndex = pFile.ReadUInt16() - 1;
if (genericParamIndex >= 0) Owner = pFile.GenericParamTable[genericParamIndex];
Constraint.LoadData(pFile);
}
示例12: LoadData
private void LoadData(CLIFile pFile)
{
Offset = pFile.ReadUInt32();
int fieldIndex = 0;
if (pFile.FieldTable.Length >= 0xFFFF) fieldIndex = pFile.ReadInt32() - 1;
else fieldIndex = pFile.ReadUInt16() - 1;
if (fieldIndex >= 0) Field = pFile.FieldTable[fieldIndex];
}
示例13: LoadData
private void LoadData(CLIFile pFile)
{
int typeDefIndex = 0;
if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
else typeDefIndex = pFile.ReadUInt16() - 1;
if (typeDefIndex >= 0) Class = pFile.TypeDefTable[typeDefIndex];
Interface.LoadData(pFile);
}
示例14: LoadData
private void LoadData(CLIFile pFile)
{
Generation = pFile.ReadUInt16();
Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
Mvid = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
EncId = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
EncBaseId = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
}
示例15: LoadData
private void LoadData(CLIFile pFile)
{
Processor = pFile.ReadUInt32();
int assemblyRefIndex = 0;
if (pFile.AssemblyRefTable.Length >= 0xFFFF) assemblyRefIndex = pFile.ReadInt32() - 1;
else assemblyRefIndex = pFile.ReadUInt16() - 1;
if (assemblyRefIndex >= 0) AssemblyRef = pFile.AssemblyRefTable[assemblyRefIndex];
}