Class TargetRuntimeProber
- Namespace
- AsmResolver.DotNet
- Assembly
- AsmResolver.DotNet.dll
Provides helper methods for inferring the .NET target runtime of an existing PE image.
public static class TargetRuntimeProber
- Inheritance
-
TargetRuntimeProber
- Inherited Members
Methods
ExtractDotNetRuntimeInfo(IResolutionScope)
Maps the corlib reference to the appropriate .NET or .NET Core version.
public static DotNetRuntimeInfo ExtractDotNetRuntimeInfo(IResolutionScope corLibScope)
Parameters
corLibScopeIResolutionScope
Returns
- DotNetRuntimeInfo
The runtime information.
TryGetLikelyTargetRuntime(in MetadataStreamSelection, out DotNetRuntimeInfo)
Obtains the name and version of the .NET runtime a provided metadata stream selection likely is targeting.
public static bool TryGetLikelyTargetRuntime(in MetadataStreamSelection streams, out DotNetRuntimeInfo targetRuntime)
Parameters
streamsMetadataStreamSelectionThe metadata streams to classify.
targetRuntimeDotNetRuntimeInfoThe likely target .NET runtime version.
Returns
- bool
trueif the runtime could be determined,falseotherwise.
TryGetLikelyTargetRuntime(PEImage, out DotNetRuntimeInfo)
Obtains the name and version of the .NET runtime a provided PE image likely is targeting.
public static bool TryGetLikelyTargetRuntime(PEImage image, out DotNetRuntimeInfo targetRuntime)
Parameters
imagePEImageThe image to classify.
targetRuntimeDotNetRuntimeInfoThe likely target .NET runtime version.
Returns
- bool
trueif the runtime could be determined,falseotherwise.