Ejemplo n.º 1
0
        public List <ReferenceSegment> Decompile(TextEditor data, ITreeNavigator navigator, DecompileFlags flags)
        {
            var assemblyLoader = (AssemblyLoader)navigator.DataItem;

            return(DomMethodNodeBuilder.Decompile(data, DomMethodNodeBuilder.GetAssemblyLoader(navigator), b =>
                                                  b.DecompileModuleAndAssemblyAttributes(), flags: flags));
        }
Ejemplo n.º 2
0
        List <ReferenceSegment> IAssemblyBrowserNodeBuilder.Decompile(TextEditor data, ITreeNavigator navigator, DecompileFlags flags)
        {
            if (DomMethodNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(null);
            }
            var evt = GetCecilLoader(navigator).GetCecilObject <EventDefinition>((IUnresolvedEvent)navigator.DataItem);

            if (evt == null)
            {
                return(null);
            }
            return(DomMethodNodeBuilder.Decompile(data, DomMethodNodeBuilder.GetAssemblyLoader(navigator), b => b.Decompile(evt), flags: flags));
        }
Ejemplo n.º 3
0
        public List <ReferenceSegment> Decompile(TextEditor data, ITreeNavigator navigator, DecompileFlags flags)
        {
            var method = (IUnresolvedMethod)navigator.DataItem;

            if (HandleSourceCodeEntity(navigator, data))
            {
                return(null);
            }
            var cecilMethod = GetCecilLoader(navigator).GetCecilObject <MethodDefinition> (method);

            if (cecilMethod == null)
            {
                return(null);
            }
            return(DomMethodNodeBuilder.Decompile(data, DomMethodNodeBuilder.GetAssemblyLoader(navigator), b => b.Decompile(cecilMethod), flags: flags));
        }
Ejemplo n.º 4
0
        public List <ReferenceSegment> Decompile(TextEditor data, ITreeNavigator navigator, DecompileFlags flags)
        {
            if (DomMethodNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(null);
            }
            var type = (IUnresolvedTypeDefinition)navigator.DataItem;

            if (type == null)
            {
                return(null);
            }
            var settings = DomMethodNodeBuilder.GetDecompilerSettings(data, flags.PublicOnly);

            return(DomMethodNodeBuilder.Decompile(data, DomMethodNodeBuilder.GetAssemblyLoader(navigator), builder => builder.DecompileType(type.FullTypeName), flags: flags));
        }