.NET Reflectorの以前のリリースでは、関数内の命令の名前空間を取得できましたが、現在は取得できず、ドキュメントは存在しません。
RedGateの.NETReflector6.8.2.5(最後の無料バージョン)
この行は機能していましたが、現在は機能していません:instruction.Value.declaringtype.namespace.ToString
命令の名前空間を取得するにはどうすればよいですか?
どうも
Private Sub DesassamblerDLL(ByVal strDLLFile As String)
Dim serviceProvider As New Reflector.ApplicationManager(Nothing)
Dim assemblyManager As Reflector.CodeModel.IAssemblyManager
Dim objAssembly As Reflector.CodeModel.IAssembly
Dim objMod As Reflector.CodeModel.IModule
Dim typeDeclaration As Reflector.CodeModel.ITypeDeclaration
Dim methodDeclaration As Reflector.CodeModel.IMethodDeclaration
assemblyManager = serviceProvider.GetService(GetType(Reflector.CodeModel.IAssemblyManager))
objAssembly = assemblyManager.LoadFile(strDLLFile)
For Each objMod In objAssembly.Modules
For Each typeDeclaration In objMod.Types
For Each methodDeclaration In typeDeclaration.Methods
Dim methodBody As Reflector.CodeModel.IMethodBody = methodDeclaration.Body
If Not methodBody Is Nothing Then
Dim instruction As Reflector.CodeModel.IInstruction
For Each instruction In methodBody.Instructions
str = instruction.Value.declaringtype.namespace.ToString
Next
End If
Next
Next
Next
End Sub