public Task <List <ReferenceSegment> > DecompileAsync(TextEditor data, ITreeNavigator navigator, DecompileFlags flags)
        {
            if (MethodDefinitionNodeBuilder.HandleSourceCodeEntity(navigator, data))
            {
                return(EmptyReferenceSegmentTask);
            }
            var type = (ITypeDefinition)navigator.DataItem;

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

            // CSharpLanguage.Instance.DecompileType (type, output, settings);
            return(MethodDefinitionNodeBuilder.DecompileAsync(
                       data,
                       MethodDefinitionNodeBuilder.GetAssemblyLoader(navigator),
                       builder => builder.Decompile(type.MetadataToken), flags: flags));
        }