当前位置: 首页>>代码示例>>C#>>正文


C# CLIFile.ReadCompressedUnsigned方法代码示例

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


在下文中一共展示了CLIFile.ReadCompressedUnsigned方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: SigArrayShape

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

			Rank = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
			uint sizeCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
			Sizes = new List<uint>((int)sizeCount);
			for (uint sizeIndex = 0; sizeIndex < sizeCount; ++sizeIndex) Sizes.Add(CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor));
			uint lowBoundCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
			LowBounds = new List<int>((int)lowBoundCount);
			for (uint lowBoundIndex = 0; lowBoundIndex < lowBoundCount; ++lowBoundIndex) LowBounds.Add(CLIFile.ReadCompressedSigned(pSignature, ref pCursor));
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:12,代码来源:SigArrayShape.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: 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

示例5: LocalVarSig

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

			++pCursor;
			uint localVarCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
			LocalVars = new List<SigLocalVar>((int)localVarCount);
			for (uint localVarIndex = 0; localVarIndex < localVarCount; ++localVarIndex) LocalVars.Add(new SigLocalVar(CLIFile, pSignature, ref pCursor));
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:9,代码来源:LocalVarSig.cs

示例6: PropertySig

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

			HasThis = (pSignature[pCursor++] & CallingConvention.HasThis) != 0;
			uint paramCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
			while (pSignature[pCursor] == (byte)SigElementType.CustomModifier_Required ||
				   pSignature[pCursor] == (byte)SigElementType.CustomModifier_Optional)
			{
				Mods.Add(new SigCustomMod(CLIFile, pSignature, ref pCursor));
			}
			Type = new SigType(CLIFile, pSignature, ref pCursor);
			Params = new List<SigParam>((int)paramCount);
			for (uint paramIndex = 0; paramIndex < paramCount; ++paramIndex) Params.Add(new SigParam(CLIFile, pSignature, ref pCursor));
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:15,代码来源:PropertySig.cs

示例7: SigType

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

			ElementType = (SigElementType)pSignature[pCursor++];
			switch (ElementType)
			{
				case SigElementType.Array:
					ArrayType = new SigType(CLIFile, pSignature, ref pCursor);
					ArrayShape = new SigArrayShape(CLIFile, pSignature, ref pCursor);
					break;
				case SigElementType.Class:
					ClassTypeDefOrRefOrSpecToken = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
					break;
				case SigElementType.FunctionPointer:
					FnPtrMethodSig = new MethodSig(CLIFile, pSignature, ref pCursor);
					break;
				case SigElementType.GenericInstantiation:
					{
						GenericInstClass = pSignature[pCursor] == (byte)SigElementType.Class;
						GenericInstValueType = pSignature[pCursor] == (byte)SigElementType.ValueType;
						++pCursor;
						GenericInstTypeDefOrRefOrSpecToken = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
						uint genericInstGenArgCount = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
						GenericInstGenArgs = new List<SigType>((int)genericInstGenArgCount);
						for (uint genericInstGenArgIndex = 0; genericInstGenArgIndex < genericInstGenArgCount; ++genericInstGenArgIndex) GenericInstGenArgs.Add(new SigType(CLIFile, pSignature, ref pCursor));
						break;
					}
				case SigElementType.MethodVar:
					MVarNumber = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
					break;
				case SigElementType.Pointer:
					while (pSignature[pCursor] == (byte)SigElementType.CustomModifier_Required ||
						   pSignature[pCursor] == (byte)SigElementType.CustomModifier_Optional)
					{
						PtrMods.Add(new SigCustomMod(CLIFile, pSignature, ref pCursor));
					}
					if (pSignature[pCursor] == (byte)SigElementType.Void)
					{
						PtrVoid = true;
						++pCursor;
					}
					else PtrType = new SigType(CLIFile, pSignature, ref pCursor);
					break;
				case SigElementType.SingleDimensionArray:
					while (pSignature[pCursor] == (byte)SigElementType.CustomModifier_Required ||
						   pSignature[pCursor] == (byte)SigElementType.CustomModifier_Optional)
					{
						SZArrayMods.Add(new SigCustomMod(CLIFile, pSignature, ref pCursor));
					}
					SZArrayType = new SigType(CLIFile, pSignature, ref pCursor);
					break;
				case SigElementType.ValueType:
					ValueTypeDefOrRefOrSpecToken = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
					break;
				case SigElementType.Var:
					VarNumber = CLIFile.ReadCompressedUnsigned(pSignature, ref pCursor);
					break;

				default: break;
			}
		}
开发者ID:carriercomm,项目名称:Proton-1,代码行数:62,代码来源:SigType.cs


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