本文整理汇总了C#中ICSharpCode.ILSpy.TreeNodes.AssemblyTreeNode类的典型用法代码示例。如果您正苦于以下问题:C# AssemblyTreeNode类的具体用法?C# AssemblyTreeNode怎么用?C# AssemblyTreeNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AssemblyTreeNode类属于ICSharpCode.ILSpy.TreeNodes命名空间,在下文中一共展示了AssemblyTreeNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReferenceFolderTreeNode
public ReferenceFolderTreeNode(ModuleDefMD module, AssemblyTreeNode parentAssembly, AssemblyListTreeNode assemblyListTreeNode)
{
this.module = module;
this.parentAssembly = parentAssembly;
this.assemblyListTreeNode = assemblyListTreeNode;
this.LazyLoading = true;
}
示例2: TreeViewUpdater
public TreeViewUpdater(CorModuleDefFile cmdf, AssemblyTreeNode node, HashSet<uint> modifiedTypes, HashSet<uint> loadedClassTokens) {
Debug.Assert(node.DnSpyFile == cmdf);
this.CorModuleDefFile = cmdf;
this.ModuleNode = node;
this.modifiedTypes = new HashSet<uint>(modifiedTypes);
this.loadedClassTokens = loadedClassTokens;
this.checkedTypes = new HashSet<TypeDef>();
this.modNode = node;
}
示例3: ModuleTreeNode
public ModuleTreeNode(ModuleDefinition moduleDefinition, AssemblyTreeNode parentAssemblyNode)
{
if (moduleDefinition == null)
throw new ArgumentNullException("moduleDefiniton");
module = moduleDefinition;
assemblyNode = parentAssemblyNode;
this.LazyLoading = true;
}
示例4: TypeTreeNode
public TypeTreeNode(TypeDef type, AssemblyTreeNode parentAssemblyNode) {
if (parentAssemblyNode == null)
throw new ArgumentNullException("parentAssemblyNode");
if (type == null)
throw new ArgumentNullException("type");
this.type = type;
this.parentAssemblyNode = parentAssemblyNode;
this.LazyLoading = true;
}
示例5: AssemblySettingsCommand
AssemblySettingsCommand(AssemblyTreeNode asmNode, AssemblyOptions newOptions)
{
this.asmNode = asmNode;
this.newOptions = newOptions;
this.origOptions = new AssemblyOptions(asmNode.LoadedAssembly.AssemblyDefinition);
if (newOptions.Name != origOptions.Name)
this.assemblyRefInfos = RefFinder.FindAssemblyRefsToThisModule(asmNode.LoadedAssembly.ModuleDefinition).Where(a => AssemblyNameComparer.NameAndPublicKeyTokenOnly.Equals(a, asmNode.LoadedAssembly.AssemblyDefinition)).Select(a => new AssemblyRefInfo(a)).ToArray();
}
示例6: AssemblyReferenceTreeNode
public AssemblyReferenceTreeNode(AssemblyNameReference r, AssemblyTreeNode parentAssembly)
{
if (parentAssembly == null)
throw new ArgumentNullException("parentAssembly");
if (r == null)
throw new ArgumentNullException("r");
this.r = r;
this.parentAssembly = parentAssembly;
this.LazyLoading = true;
}
示例7: TypeTreeNode
public TypeTreeNode(TypeDefinition type, AssemblyTreeNode parentAssemblyNode)
{
if (parentAssemblyNode == null)
throw new ArgumentNullException("parentAssemblyNode");
if (type == null)
throw new ArgumentNullException("type");
this.type = type;
this.parentAssemblyNode = parentAssemblyNode;
this.LazyLoading = true;
this.Foreground = IsPublicAPI ? NodeBrushes.Normal : NodeBrushes.Private;
}
示例8: NamespaceTreeNodeCreator
public NamespaceTreeNodeCreator(string ns, AssemblyTreeNode asmNode) {
Debug.Assert(asmNode.IsModule);
if (!asmNode.IsModule)
throw new InvalidOperationException();
this.asmNode = asmNode;
this.nsNode = asmNode.FindNamespaceNode(ns);
if (this.nsNode == null) {
this.nsNode = new NamespaceTreeNode(ns);
this.nsNodeCreated = true;
}
}
示例9: AssemblyReferenceTreeNode
internal AssemblyReferenceTreeNode(AssemblyRef r, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode) {
if (parentAssembly == null)
throw new ArgumentNullException("parentAssembly");
if (dnSpyFileListTreeNode == null)
throw new ArgumentNullException("dnSpyFileListTreeNode");
if (r == null)
throw new ArgumentNullException("r");
this.r = r;
this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
this.parentAssembly = parentAssembly;
this.LazyLoading = true;
}
示例10: RegisterCached
public void RegisterCached(LoadedAssembly asm, AssemblyTreeNode asmNode)
{
CachedAssemblyTreeNode cachedInfo;
if (!cachedAsmTreeNodes.TryGetValue(asm, out cachedInfo))
cachedAsmTreeNodes.Add(asm, cachedInfo = new CachedAssemblyTreeNode(asmNode));
else {
Debug.Assert(cachedInfo.AssemblyTreeNode == asmNode);
if (cachedInfo.AssemblyTreeNode != asmNode)
throw new InvalidOperationException();
}
cachedInfo.Counter++;
}
示例11: CachedAssemblyTreeNode
public CachedAssemblyTreeNode(AssemblyTreeNode asmNode)
{
this.AssemblyTreeNode = asmNode;
}
示例12: OnFileNameChangedInternal
static void OnFileNameChangedInternal(AssemblyTreeNode node)
{
node.RaisePropertyChanged("Text");
node.RaisePropertyChanged("ToolTip");
}
示例13: GetAllRelatedNodes
static IEnumerable<AssemblyTreeNode> GetAllRelatedNodes(AssemblyTreeNode node)
{
if (node.Parent is AssemblyTreeNode)
node = (AssemblyTreeNode)node.Parent;
yield return node;
foreach (var child in node.Children) {
var asmChild = child as AssemblyTreeNode;
if (asmChild != null)
yield return asmChild;
}
}
示例14: RemoveNetModuleFromAssemblyCommand
RemoveNetModuleFromAssemblyCommand(AssemblyTreeNode modNode)
{
this.asmNode = (AssemblyTreeNode)modNode.Parent;
Debug.Assert(this.asmNode != null);
this.modNode = modNode;
this.removeIndex = asmNode.Children.IndexOf(modNode);
Debug.Assert(this.removeIndex > 0);
Debug.Assert(asmNode.LoadedAssembly.AssemblyDefinition != null &&
asmNode.LoadedAssembly.AssemblyDefinition.Modules.IndexOf(modNode.LoadedAssembly.ModuleDefinition) == this.removeIndex);
}
示例15: OnConvertedToAssembly
/// <summary>
/// Called when it's been converted to an assembly
/// </summary>
/// <param name="modNode">Old child as returned by <see cref="OnConvertedToNetModule()"/></param>
internal void OnConvertedToAssembly(AssemblyTreeNode modNode = null)
{
Debug.Assert(Children.Count == 0 || !(Children[0] is AssemblyTreeNode));
Debug.Assert(!(Parent is AssemblyTreeNode));
SharpTreeNode[] oldChildren = null;
if (!LazyLoading) {
// Children already loaded
oldChildren = Children.ToArray();
Children.Clear();
}
Debug.Assert(Children.Count == 0);
if (Children.Count != 0)
throw new InvalidOperationException();
var newChild = modNode ?? new AssemblyTreeNode(assembly);
Debug.Assert(newChild.Parent == null);
if (newChild.Parent != null)
throw new InvalidOperationException();
Children.Add(newChild);
newChild.LazyLoading = LazyLoading;
LazyLoading = false;
if (oldChildren != null) {
newChild.Children.AddRange(oldChildren);
newChild.typeDict.AddRange(typeDict);
typeDict.Clear();
newChild.namespaces.AddRange(namespaces);
namespaces.Clear();
}
Debug.Assert(typeDict.Count == 0);
Debug.Assert(namespaces.Count == 0);
RaiseUIPropsChanged();
}