Esempio n. 1
0
        public override async Task <PageGraphResponse> ExecuteAsync(PageGraphQuery message)
        {
            var graph = await builderFromDb.Build();

            var svg = pageGraphFormatter.LinksAndForms(graph);

            svg = svg.Substring(svg.IndexOf("<svg"));
            return(new PageGraphResponse()
            {
                Svg = svg
            });
        }
Esempio n. 2
0
        public override async Task <SvgResponse> ExecuteAsync(Graph_GET message)
        {
            await Task.CompletedTask;

            string svg = "";
            Func <PageNode, bool> predicate = x => true;;

            if (message.Q == "users")
            {
                predicate = x => x.ParameterizedUrl == "/api" ||
                            x.ParameterizedUrl.StartsWith("/api/users");
            }

            var assembly = LeBonCoin.AssemblyInfo.Assembly;
            var graph    = builder.Build(assembly, predicate);

            svg = formatter.LinksAndForms(graph);


            return(new SvgResponse()
            {
                Svg = svg
            });
        }