public static ITextOutput Write(ITextOutput output, ModuleRef r, Language language) { output.Write(UIUtils.CleanUpIdentifier(r.Name), TextTokenType.Text); r.MDToken.WriteSuffixString(output); return output; }
public virtual TreeViewNodeFilterResult GetFilterResult(ModuleRef modRef) { return new TreeViewNodeFilterResult(FilterResult.Hidden, false); }
public virtual FileTreeNodeFilterResult GetResult(ModuleRef modRef) { return this.filter.GetResult(modRef); }
public ModuleReferenceTreeNode(ModuleRef r) { if (r == null) throw new ArgumentNullException("r"); this.r = r; }
public ModuleReferenceNode(ITreeNodeGroup treeNodeGroup, ModuleRef moduleRef) { this.treeNodeGroup = treeNodeGroup; this.moduleRef = moduleRef; }
public override TreeViewNodeFilterResult GetFilterResult(ModuleRef modRef) { bool isMatch = (flags & VisibleMembersFlags.ModuleRef) != 0; if (!isMatch) return new TreeViewNodeFilterResult(FilterResult.Hidden, isMatch); return new TreeViewNodeFilterResult(FilterResult.Match, isMatch); }
public void Write(ISyntaxHighlightOutput output, ILanguage language, ModuleRef modRef, bool showToken) { output.Write(NameUtils.CleanIdentifier(modRef.Name), TextTokenKind.Text); WriteToken(output, modRef, showToken); }
TypeRefUser CreateDefaultGlobalTypeRef(ModuleRef mr) { return new TypeRefUser(module, string.Empty, "<Module>", mr); }
public IModuleReferenceNode Create(ModuleRef modRef) { return Context.FileTreeView.Create(modRef); }
public override DocumentTreeNodeFilterResult GetResult(ModuleRef modRef) { bool isMatch = (flags & VisibleMembersFlags.ModuleRef) != 0; if (!isMatch) return new DocumentTreeNodeFilterResult(FilterType.Hide, isMatch); return new DocumentTreeNodeFilterResult(FilterType.Visible, isMatch); }
public virtual FileTreeNodeFilterResult GetResult(ModuleRef modRef) { return new FileTreeNodeFilterResult(); }
public virtual DocumentTreeNodeFilterResult GetResult(ModuleRef modRef) => new DocumentTreeNodeFilterResult(FilterType.Hide, false);
public virtual FileTreeNodeFilterResult GetResult(ModuleRef modRef) { return new FileTreeNodeFilterResult(FilterType.Hide, false); }
public virtual DocumentTreeNodeFilterResult GetResult(ModuleRef modRef) => new DocumentTreeNodeFilterResult();
public virtual TreeViewNodeFilterResult GetFilterResult(ModuleRef modRef) { return new TreeViewNodeFilterResult(); }
TypeRefUser GetGlobalTypeRef(ModuleRef mr) { if (module == null) return CreateDefaultGlobalTypeRef(mr); var globalType = module.GlobalType; if (globalType != null && new SigComparer().Equals(module, mr)) return new TypeRefUser(module, globalType.Namespace, globalType.Name, mr); var asm = module.Assembly; if (asm == null) return CreateDefaultGlobalTypeRef(mr); var mod = asm.FindModule(mr.Name); if (mod == null) return CreateDefaultGlobalTypeRef(mr); globalType = mod.GlobalType; if (globalType == null) return CreateDefaultGlobalTypeRef(mr); return new TypeRefUser(module, globalType.Namespace, globalType.Name, mr); }
TypeRefUser CreateDefaultGlobalTypeRef(ModuleRef mr) { var tr = new TypeRefUser(module, string.Empty, "<Module>", mr); if (module != null) module.UpdateRowId(tr); return tr; }
/// <summary> /// Constructor /// </summary> /// <param name="scope">Scope</param> /// <param name="name">Name</param> /// <param name="flags">Flags</param> public ImplMapUser(ModuleRef scope, UTF8String name, PInvokeAttributes flags) { this.scope = scope; this.name = name; this.flags = flags; }
public virtual DocumentTreeNodeFilterResult GetResult(ModuleRef modRef) => filter.GetResult(modRef);
bool? CanAccess(ModuleRef mod, MemberRef mr) { if (mr == null || mod == null || mod.Module == null) return null; var userModule = userType.Module; if (userModule == null) return null; if (!IsSameAssembly(userModule.Assembly, mod.Module.Assembly)) return false; if (userModule.Assembly == null) return false; var otherMod = userModule.Assembly.FindModule(mod.Name); if (otherMod == null) return false; return CanAccess(otherMod.GlobalType, mr); }
/// <summary> /// Constructor /// </summary> /// <param name="scope">Scope</param> /// <param name="name">Name</param> /// <param name="flags">Flags</param> public ImplMapUser(ModuleRef scope, UTF8String name, PInvokeAttributes flags) { this.module = scope; this.name = name; this.attributes = (int)flags; }
public ModuleReferenceNodeImpl(ITreeNodeGroup treeNodeGroup, ModuleRef moduleRef) : base(moduleRef) { TreeNodeGroup = treeNodeGroup; }
/// <summary> /// Writes a module reference /// </summary> /// <param name="output">Output</param> /// <param name="decompiler">Decompiler</param> /// <param name="modRef">Module reference</param> /// <param name="showToken">true to write tokens</param> public void Write(ITextColorWriter output, IDecompiler decompiler, ModuleRef modRef, bool showToken) { output.Write(BoxedTextColor.Text, NameUtilities.CleanIdentifier(modRef.Name)); WriteToken(output, modRef, showToken); }