本文整理汇总了C#中dnSpy.Tabs.DecompileTabState.SetDecompileProps方法的典型用法代码示例。如果您正苦于以下问题:C# DecompileTabState.SetDecompileProps方法的具体用法?C# DecompileTabState.SetDecompileProps怎么用?C# DecompileTabState.SetDecompileProps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dnSpy.Tabs.DecompileTabState
的用法示例。
在下文中一共展示了DecompileTabState.SetDecompileProps方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DecompileNodes
bool? DecompileNodes(DecompileTabState tabState, DecompilerTextViewState state, bool recordHistory, Language language, ILSpyTreeNode[] nodes, bool forceDecompile = false)
{
if (tabState.ignoreDecompilationRequests)
return null;
// Ignore all nodes that have been deleted
nodes = FilterOutDeletedNodes(nodes);
if (tabState.HasDecompiled && !forceDecompile && tabState.Equals(nodes, language)) {
if (state != null)
tabState.TextView.EditorPositionState = state.EditorPositionState;
return false;
}
if (tabState.HasDecompiled && recordHistory)
RecordHistory(tabState);
tabState.HasDecompiled = true;
tabState.SetDecompileProps(language, nodes);
if (nodes.Length == 1) {
var node = nodes[0];
var viewObject = node.GetViewObject(tabState.TextView);
if (viewObject != null) {
tabState.TextView.CancelDecompileAsync();
tabState.Content = viewObject;
return true;
}
if (node.View(tabState.TextView)) {
tabState.Content = tabState.TextView;
tabState.TextView.CancelDecompileAsync();
return true;
}
}
tabState.Content = tabState.TextView;
tabState.TextView.DecompileAsync(language, nodes, new DecompilationOptions() { TextViewState = state, DecompilerTextView = tabState.TextView });
return true;
}