"景先生毕设|www.jxszl.com

C# AppDomain类代码示例

2023-12-29 17:05编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中AppDomain类的典型用法代码示例。如果您正苦于以下问题:C#AppDomain类的具体用法?C#AppDomain怎么用?C#AppDomain使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:StackFrame internalStackFrame(Threadthread,ICorDebugILFramecorILFrame,uintchainIndex,uintframeIndex) { this.process=thread.Process; this.thread=thread; this.appDomain=process.AppDomains[corILFrame.GetFunction().GetClass().GetModule().GetAssembly().GetAppDomain()]; this.corILFrame=corILFrame; this.corILFramePauseSession=process.PauseSession; this.corFunction=corILFrame.GetFunction(); this.chainIndex=chainIndex; this.frameIndex=frameIndex; MetaDataImportmetaData=thread.Process.Modules[corFunction.GetClass().GetModule()].MetaData; intmethodGenArgs=metaData.EnumGenericParams(corFunction.GetToken()).Length; //Classparametersarefirst,thenthemethodones ListcorGenArgs=((ICorDebugILFrame2)corILFrame).EnumerateTypeParameters().ToList(); //Removemethodparametrsattheend corGenArgs.RemoveRange(corGenArgs.Count-methodGenArgs,methodGenArgs); ListgenArgs=newList(corGenArgs.Count); foreach(ICorDebugTypecorGenArgincorGenArgs){ genArgs.Add(DebugType.CreateFromCorType(this.AppDomain,corGenArg)); } DebugTypedebugType=DebugType.CreateFromCorClass( this.AppDomain, null, corFunction.GetClass(), genArgs.ToArray() ); this.methodInfo=(DebugMethodInfo)debugType.GetMember(corFunction.GetToken()); }
原文链接:http://www.jxszl.com/biancheng/C/556551.html