• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CLIFile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CLIFile的典型用法代码示例。如果您正苦于以下问题:C# CLIFile类的具体用法?C# CLIFile怎么用?C# CLIFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CLIFile类属于命名空间,在下文中一共展示了CLIFile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:28,代码来源:SigRetType.cs


示例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);
			}
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:29,代码来源:SigLocalVar.cs


示例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);
        }
开发者ID:Astaelan,项目名称:Fusion,代码行数:7,代码来源:SigCustomMod.cs


示例4: LoadData

		private void LoadData(CLIFile pFile)
		{
			Offset = pFile.ReadUInt32();
			Flags = (ManifestResourceAttributes)pFile.ReadUInt32();
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			Implementation.LoadData(pFile);
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:7,代码来源:ManifestResourceData.cs


示例5: LoadData

 private void LoadData(CLIFile pFile)
 {
     Number = pFile.ReadUInt16();
     Flags = pFile.ReadUInt16();
     Owner.LoadData(pFile);
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:7,代码来源:GenericParamData.cs


示例6: LoadData

		private void LoadData(CLIFile pFile)
		{
			Number = pFile.ReadUInt16();
			Flags = (GenericParamAttributes)pFile.ReadUInt16();
			Owner.LoadData(pFile);
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:7,代码来源:GenericParamData.cs


示例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);
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:7,代码来源:StandAloneSigData.cs


示例8: LoadData

 private void LoadData(CLIFile pFile)
 {
     Offset = pFile.ReadUInt32();
     Flags = pFile.ReadUInt32();
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Implementation.LoadData(pFile);
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:7,代码来源:ManifestResourceData.cs


示例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));
                }
            }
        }
开发者ID:Astaelan,项目名称:Fusion,代码行数:34,代码来源:MethodSig.cs


示例10: LoadData

		private void LoadData(CLIFile pFile)
		{
			Type = (SigElementType)pFile.ReadByte();
			pFile.ReadByte();
			Parent.LoadData(pFile);
			Value = pFile.ReadBlobHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Blob32Bit));
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:7,代码来源:ConstantData.cs


示例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);
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:8,代码来源:GenericParamConstraintData.cs


示例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];
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:8,代码来源:FieldLayoutData.cs


示例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);
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:8,代码来源:InterfaceImplData.cs


示例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));
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:8,代码来源:ModuleData.cs


示例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];
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:8,代码来源:AssemblyRefProcessorData.cs


示例16: Initialize

 public static void Initialize(CLIFile pFile)
 {
     if ((pFile.CLIMetadataTablesHeader.PresentTables & (1ul << CLIMetadataTables.AssemblyProcessor)) != 0)
     {
         pFile.AssemblyProcessorTable = new AssemblyProcessorData[pFile.ReadInt32()];
         for (int index = 0; index < pFile.AssemblyProcessorTable.Length; ++index) pFile.AssemblyProcessorTable[index] = new AssemblyProcessorData() { CLIFile = pFile, TableIndex = index };
     }
     else pFile.AssemblyProcessorTable = new AssemblyProcessorData[0];
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:9,代码来源:AssemblyProcessorData.cs


示例17: LinkData

        private void LinkData(CLIFile pFile)
        {
            int paramListCount = pFile.ParamTable.Length - ParamListIndex;
            if (TableIndex < (pFile.MethodDefTable.Length - 1)) paramListCount = pFile.MethodDefTable[TableIndex + 1].ParamListIndex - ParamListIndex;
            for (int index = 0; index < paramListCount; ++index) { ParamList.Add(pFile.ParamTable[ParamListIndex + index]); pFile.ParamTable[ParamListIndex + index].ParentMethodDef = this; }

            int cursor = 0;
            ExpandedSignature = new MethodSig(pFile, Signature, ref cursor);
        }
开发者ID:Astaelan,项目名称:Fusion,代码行数:9,代码来源:MethodDefData.cs


示例18: LoadData

		private void LoadData(CLIFile pFile)
		{
			PackingSize = pFile.ReadUInt16();
			ClassSize = pFile.ReadUInt32();
			int typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) Parent = pFile.TypeDefTable[typeDefIndex];
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:9,代码来源:ClassLayoutData.cs


示例19: Initialize

 public static void Initialize(CLIFile pFile)
 {
     if ((pFile.CLIMetadataTablesHeader.PresentTables & (1ul << CLIMetadataTables.ManifestResource)) != 0)
     {
         pFile.ManifestResourceTable = new ManifestResourceData[pFile.ReadInt32()];
         for (int index = 0; index < pFile.ManifestResourceTable.Length; ++index) pFile.ManifestResourceTable[index] = new ManifestResourceData() { CLIFile = pFile, TableIndex = index };
     }
     else pFile.ManifestResourceTable = new ManifestResourceData[0];
 }
开发者ID:Astaelan,项目名称:Fusion,代码行数:9,代码来源:ManifestResourceData.cs


示例20: MethodSpecSig

        public MethodSpecSig(CLIFile pCLIFile, byte[] pSignature, ref int pCursor)
        {
            CLIFile = pCLIFile;

            ++pCursor;
            uint genArgsCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
            GenArgs = new List<SigType>((int)genArgsCount);
            for (uint genArgsIndex = 0; genArgsIndex < genArgsCount; ++genArgsIndex) GenArgs.Add(new SigType(CLIFile, pSignature, ref pCursor));
        }
开发者ID:Astaelan,项目名称:Fusion,代码行数:9,代码来源:MethodSpecSig.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CLLocation类代码示例发布时间:2022-05-24
下一篇:
C# CKA类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap