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


C# DotNet.GenericParamContext类代码示例

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


GenericParamContext类属于dnlib.DotNet命名空间,在下文中一共展示了GenericParamContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CorMethodSpec

		public CorMethodSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:CorMethodSpec.cs

示例2: CorStandAloneSig

		public CorStandAloneSig(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			this.origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:7,代码来源:CorStandAloneSig.cs

示例3: CorTypeSpec

 public CorTypeSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     this.gpContext = gpContext;
 }
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:7,代码来源:CorTypeSpec.cs

示例4: CorInterfaceImpl

		public CorInterfaceImpl(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			this.origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:7,代码来源:CorInterfaceImpl.cs

示例5: InitializeSecurityAttributes

		protected override void InitializeSecurityAttributes() {
			var mdi = readerModule.MetaDataImport;
			uint token = OriginalToken.Raw;
			var data = MDAPI.GetPermissionSetBlob(mdi, token) ?? new byte[0];
			var gpContext = new GenericParamContext();
			var tmp = DeclSecurityReader.Read(readerModule, data, gpContext);
			Interlocked.CompareExchange(ref securityAttributes, tmp, null);
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:8,代码来源:CorDeclSecurity.cs

示例6: Read

		public void Read(MethodDef method) {
			this.gpContext = GenericParamContext.Create(method);
			this.parameters = method.Parameters;
			SetLocals(GetLocals(method));

			maxStackSize = (ushort)reader.ReadInt32();
			ReadInstructionsNumBytes(reader.ReadUInt32());
			ReadExceptionHandlers();
		}
开发者ID:GodLesZ,项目名称:de4dot,代码行数:9,代码来源:MethodBodyReader.cs

示例7: CustomAttributeReader

 CustomAttributeReader(ModuleDefMD readerModule, uint offset, GenericParamContext gpContext)
 {
     this.module = readerModule;
     this.reader = readerModule.BlobStream.CreateStream(offset);
     this.ownReader = true;
     this.genericArguments = null;
     this.recursionCounter = new RecursionCounter();
     this.verifyReadAllBytes = false;
     this.gpContext = gpContext;
 }
开发者ID:NSentinel,项目名称:dnlib,代码行数:10,代码来源:CustomAttributeReader.cs

示例8: ResolveTypeDefOrRef

			public ITypeDefOrRef ResolveTypeDefOrRef(uint codedToken, GenericParamContext gpContext) {
				uint token;
				if (!CodedToken.TypeDefOrRef.Decode(codedToken, out token))
					return null;
				uint rid = MDToken.ToRID(token);
				switch (MDToken.ToTable(token)) {
				case Table.TypeDef:		return new TypeDefDndbg(mdi, rid);
				case Table.TypeRef:		return new TypeRefDndbg(mdi, rid);
				case Table.TypeSpec:	return new TypeSpecDndbg(mdi, rid, this);
				}
				return null;
			}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:12,代码来源:DndbgSignatureReader.cs

示例9: arithmetic_read

		static Instruction arithmetic_read(BinaryReader reader, IInstructionOperandResolver resolver, GenericParamContext gpContext) {
			switch (reader.ReadByte()) {
			case 0: return OpCodes.Add.ToInstruction();
			case 1: return OpCodes.Add_Ovf.ToInstruction();
			case 2: return OpCodes.Add_Ovf_Un.ToInstruction();
			case 3: return OpCodes.Sub.ToInstruction();
			case 4: return OpCodes.Sub_Ovf.ToInstruction();
			case 5: return OpCodes.Sub_Ovf_Un.ToInstruction();
			case 6: return OpCodes.Mul.ToInstruction();
			case 7: return OpCodes.Mul_Ovf.ToInstruction();
			case 8: return OpCodes.Mul_Ovf_Un.ToInstruction();
			case 9: return OpCodes.Div.ToInstruction();
			case 10: return OpCodes.Div_Un.ToInstruction();
			case 11: return OpCodes.Rem.ToInstruction();
			case 12: return OpCodes.Rem_Un.ToInstruction();
			default: throw new ApplicationException("Invalid opcode");
			}
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:18,代码来源:OpCodeHandler.cs

示例10: ResolveStandAloneSig

 /// <summary>
 /// Resolves a <see cref="StandAloneSig"/>
 /// </summary>
 /// <param name="rid">The row ID</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A <see cref="StandAloneSig"/> instance or <c>null</c> if <paramref name="rid"/> is invalid</returns>
 public StandAloneSig ResolveStandAloneSig(uint rid, GenericParamContext gpContext)
 {
     return listStandAloneSigMD[rid - 1, gpContext];
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:10,代码来源:ModuleDefMD.cs

示例11: ResolveMethodSpec

 /// <summary>
 /// Resolves a <see cref="MethodSpec"/>
 /// </summary>
 /// <param name="rid">The row ID</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A <see cref="MethodSpec"/> instance or <c>null</c> if <paramref name="rid"/> is invalid</returns>
 public MethodSpec ResolveMethodSpec(uint rid, GenericParamContext gpContext)
 {
     return listMethodSpecMD[rid - 1, gpContext];
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:10,代码来源:ModuleDefMD.cs

示例12: ResolveCustomAttributeType

 /// <summary>
 /// Resolves a <see cref="ICustomAttributeType"/>
 /// </summary>
 /// <param name="codedToken">A <c>CustomAttributeType</c> coded token</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A <see cref="ICustomAttributeType"/> or <c>null</c> if <paramref name="codedToken"/> is invalid</returns>
 public ICustomAttributeType ResolveCustomAttributeType(uint codedToken, GenericParamContext gpContext)
 {
     uint token;
     if (!CodedToken.CustomAttributeType.Decode(codedToken, out token))
         return null;
     uint rid = MDToken.ToRID(token);
     switch (MDToken.ToTable(token)) {
     case Table.Method:		return ResolveMethod(rid);
     case Table.MemberRef:	return ResolveMemberRef(rid, gpContext);
     }
     return null;
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:18,代码来源:ModuleDefMD.cs

示例13: ReadTypeSignature

 /// <summary>
 /// Reads a type signature from the #Blob stream
 /// </summary>
 /// <param name="sig">#Blob stream offset of signature</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A new <see cref="TypeSig"/> instance or <c>null</c> if
 /// <paramref name="sig"/> is invalid.</returns>
 public TypeSig ReadTypeSignature(uint sig, GenericParamContext gpContext)
 {
     return SignatureReader.ReadTypeSig(this, sig, gpContext);
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:11,代码来源:ModuleDefMD.cs

示例14: ReadCustomAttribute

 /// <summary>
 /// Reads a <see cref="CustomAttribute"/>
 /// </summary>
 /// <param name="caRid">Custom attribute rid</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A new <see cref="CustomAttribute"/> instance or <c>null</c> if
 /// <paramref name="caRid"/> is invalid</returns>
 public CustomAttribute ReadCustomAttribute(uint caRid, GenericParamContext gpContext)
 {
     var caRow = TablesStream.ReadCustomAttributeRow(caRid);
     if (caRow == null)
         return null;
     return CustomAttributeReader.Read(this, ResolveCustomAttributeType(caRow.Type, gpContext), caRow.Value, gpContext);
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:14,代码来源:ModuleDefMD.cs

示例15: ReadMethodBody

        /// <summary>
        /// Reads a method body
        /// </summary>
        /// <param name="method">Method</param>
        /// <param name="rva">Method RVA</param>
        /// <param name="implAttrs">Method impl attrs</param>
        /// <param name="gpContext">Generic parameter context</param>
        /// <returns>A <see cref="MethodBody"/> or <c>null</c> if none</returns>
        internal MethodBody ReadMethodBody(MethodDefMD method, RVA rva, MethodImplAttributes implAttrs, GenericParamContext gpContext)
        {
            MethodBody mb;
            var mDec = methodDecrypter;
            if (mDec != null && mDec.GetMethodBody(method.OrigRid, rva, method.Parameters, gpContext, out mb)) {
                var cilBody = mb as CilBody;
                if (cilBody != null)
                    return InitializeBodyFromPdb(cilBody, method.OrigRid);
                return mb;
            }

            if (rva == 0)
                return null;
            var codeType = implAttrs & MethodImplAttributes.CodeTypeMask;
            if (codeType == MethodImplAttributes.IL)
                return InitializeBodyFromPdb(ReadCilBody(method.Parameters, rva, gpContext), method.OrigRid);
            if (codeType == MethodImplAttributes.Native)
                return new NativeMethodBody(rva);
            return null;
        }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:28,代码来源:ModuleDefMD.cs


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