本文整理汇总了C#中ICorDebugModule.IsInMemory方法的典型用法代码示例。如果您正苦于以下问题:C# ICorDebugModule.IsInMemory方法的具体用法?C# ICorDebugModule.IsInMemory怎么用?C# ICorDebugModule.IsInMemory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICorDebugModule
的用法示例。
在下文中一共展示了ICorDebugModule.IsInMemory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadModuleAsync
internal static Task<IUnresolvedAssembly> LoadModuleAsync(Module module, ICorDebugModule corModule)
{
string name = corModule.GetName();
if (corModule.IsDynamic() == 1 || corModule.IsInMemory() == 1) {
var defaultUnresolvedAssembly = new DefaultUnresolvedAssembly(name);
var defaultUnresolvedTypeDefinition = new DefaultUnresolvedTypeDefinition("UnknownDynamicType");
var defaultUnresolvedMethod = new DefaultUnresolvedMethod(defaultUnresolvedTypeDefinition, "UnknownMethod");
var defaultUnresolvedField = new DefaultUnresolvedField(defaultUnresolvedTypeDefinition, "UnknownField");
defaultUnresolvedTypeDefinition.Members.Add(defaultUnresolvedMethod);
defaultUnresolvedTypeDefinition.Members.Add(defaultUnresolvedField);
defaultUnresolvedAssembly.AddTypeDefinition(defaultUnresolvedTypeDefinition);
weakTable.Add(defaultUnresolvedAssembly, new ModuleMetadataInfo(module, null));
return Task.FromResult<IUnresolvedAssembly>(defaultUnresolvedAssembly);
}
//return Task.FromResult(LoadModule(module, name));
return Task.Run(() => LoadModule(module, name));
}
示例2: LoadModuleAsync
internal static Task<IUnresolvedAssembly> LoadModuleAsync(Module module, ICorDebugModule corModule)
{
string name = corModule.GetName();
if (corModule.IsDynamic() == 1 || corModule.IsInMemory() == 1) {
var defaultUnresolvedAssembly = new DefaultUnresolvedAssembly(name);
weakTable.Add(defaultUnresolvedAssembly, new ModuleMetadataInfo(module, null));
return Task.FromResult<IUnresolvedAssembly>(defaultUnresolvedAssembly);
}
//return Task.FromResult(LoadModule(module, name));
return Task.Run(() => LoadModule(module, name));
}