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

C# DotNet.GenericParamContext类代码示例

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

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



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


示例16: ReadGenericParamConstraint

 /// <summary>
 /// Reads a new <see cref="GenericParamConstraintMD"/> instance. This one is not cached.
 /// </summary>
 /// <param name="rid">Row ID</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A new <see cref="GenericParamConstraintMD"/> instance</returns>
 internal GenericParamConstraintMD ReadGenericParamConstraint(uint rid, GenericParamContext gpContext)
 {
     return new GenericParamConstraintMD(this, rid, gpContext);
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:10,代码来源:ModuleDefMD.cs


示例17: ResolveToken

 /// <summary>
 /// Resolves a token
 /// </summary>
 /// <param name="token">The metadata token</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A <see cref="IMDTokenProvider"/> or <c>null</c> if <paramref name="token"/> is invalid</returns>
 public override IMDTokenProvider ResolveToken(uint token, GenericParamContext gpContext)
 {
     uint rid = MDToken.ToRID(token);
     switch (MDToken.ToTable(token)) {
     case Table.Module:			return ResolveModule(rid);
     case Table.TypeRef:			return ResolveTypeRef(rid);
     case Table.TypeDef:			return ResolveTypeDef(rid);
     case Table.Field:			return ResolveField(rid);
     case Table.Method:			return ResolveMethod(rid);
     case Table.Param:			return ResolveParam(rid);
     case Table.InterfaceImpl:	return ResolveInterfaceImpl(rid, gpContext);
     case Table.MemberRef:		return ResolveMemberRef(rid, gpContext);
     case Table.Constant:		return ResolveConstant(rid);
     case Table.DeclSecurity:	return ResolveDeclSecurity(rid);
     case Table.ClassLayout:		return ResolveClassLayout(rid);
     case Table.StandAloneSig:	return ResolveStandAloneSig(rid, gpContext);
     case Table.Event:			return ResolveEvent(rid);
     case Table.Property:		return ResolveProperty(rid);
     case Table.ModuleRef:		return ResolveModuleRef(rid);
     case Table.TypeSpec:		return ResolveTypeSpec(rid, gpContext);
     case Table.ImplMap:			return ResolveImplMap(rid);
     case Table.Assembly:		return ResolveAssembly(rid);
     case Table.AssemblyRef:		return ResolveAssemblyRef(rid);
     case Table.File:			return ResolveFile(rid);
     case Table.ExportedType:	return ResolveExportedType(rid);
     case Table.ManifestResource:return ResolveManifestResource(rid);
     case Table.GenericParam:	return ResolveGenericParam(rid);
     case Table.MethodSpec:		return ResolveMethodSpec(rid, gpContext);
     case Table.GenericParamConstraint: return ResolveGenericParamConstraint(rid, gpContext);
     }
     return null;
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:38,代码来源:ModuleDefMD.cs


示例18: ResolveTypeSpec

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


示例19: MemberRefMD

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="readerModule">The module which contains this <c>MemberRef</c> row</param>
		/// <param name="rid">Row ID</param>
		/// <param name="gpContext">Generic parameter context</param>
		/// <exception cref="ArgumentNullException">If <paramref name="readerModule"/> is <c>null</c></exception>
		/// <exception cref="ArgumentException">If <paramref name="rid"/> is invalid</exception>
		public MemberRefMD(ModuleDefMD readerModule, uint rid, GenericParamContext gpContext) {
#if DEBUG
			if (readerModule == null)
				throw new ArgumentNullException("readerModule");
			if (readerModule.TablesStream.MemberRefTable.IsInvalidRID(rid))
				throw new BadImageFormatException(string.Format("MemberRef rid {0} does not exist", rid));
#endif
			this.origRid = rid;
			this.rid = rid;
			this.readerModule = readerModule;
			this.module = readerModule;
			uint @class, name;
			uint signature = readerModule.TablesStream.ReadMemberRefRow(origRid, out @class, out name);
			this.name = readerModule.StringsStream.ReadNoNull(name);
			[email protected] = readerModule.ResolveMemberRefParent(@class, gpContext);
			this.signature = readerModule.ReadSignature(signature, gpContext);
		}
开发者ID:xingkongtianyu,项目名称:Protect.NET,代码行数:25,代码来源:MemberRef.cs


示例20: ReadMarshalType

 /// <summary>
 /// Reads a <see cref="MarshalType"/> from the blob
 /// </summary>
 /// <param name="table">Table of owner</param>
 /// <param name="rid">Row ID of owner</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A new <see cref="MarshalType"/> instance or <c>null</c> if there's no field
 /// marshal for this owner.</returns>
 internal MarshalType ReadMarshalType(Table table, uint rid, GenericParamContext gpContext)
 {
     var row = TablesStream.ReadFieldMarshalRow(MetaData.GetFieldMarshalRid(table, rid));
     if (row == null)
         return null;
     return MarshalBlobReader.Read(this, row.NativeType, gpContext);
 }
开发者ID:dmirmilshteyn,项目名称:dnlib,代码行数:15,代码来源:ModuleDefMD.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DotNet.MethodSig类代码示例发布时间:2022-05-26
下一篇:
C# DotNet.FullNameCreator类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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