コード例 #1
0
        public HtmlDocument Html()
        {
            var tags = new List <HtmlTag> {
                showIntro()
            };

            IEnumerable <Type> ignoredModels = new[]
            {
                typeof(RenderHtmlDocumentNode),
                typeof(RenderHtmlTagNode),
                typeof(RenderJsonNode)
            };
            var table = BehaviorGraphWriter.WriteBehaviorChainTable(_behaviorGraph.Behaviors
                                                                    .Where(b => b.HasOutputBehavior() && !b.ActionOutputType().IsSimple())
                                                                    .Where(b => b.Outputs.Select(o => o.GetType()).Except(ignoredModels).Any())
                                                                    .OrderBy(b => b.RoutePattern),
                                                                    new RouteColumn(),
                                                                    new OutputModelColumn(_examplePageUrl),
                                                                    new OutputColumn());

            tags.Add(table);
            var doc = DiagnosticHtml.BuildDocument(_urlRegistry, "FubuMVC.UI Examples", tags.ToArray());

            doc.AddStyle(DiagnosticHtml.GetResourceText(GetType(), "examples.css"));
            return(doc);
        }
コード例 #2
0
        public void SetUp()
        {
            graph = new FubuRegistry().BuildGraph();
            urls = MockRepository.GenerateMock<IUrlRegistry>();

            writer = new BehaviorGraphWriter(graph, urls, null);
        }
コード例 #3
0
        public void SetUp()
        {
            graph = new FubuRegistry().BuildGraph();
            urls  = MockRepository.GenerateMock <IUrlRegistry>();

            writer = new BehaviorGraphWriter(graph, urls, null);
        }
コード例 #4
0
 public void SetUp()
 {
     graph = new FubuRegistry().BuildGraph();
     urls = MockRepository.GenerateMock<IUrlRegistry>();
     
     writer = new BehaviorGraphWriter(graph, urls, null, new StubCurrentHttpRequest("http://server"));
 }
コード例 #5
0
        public void SetUp()
        {
            graph = new FubuRegistry().BuildGraph();
            urls = MockRepository.GenerateMock<IUrlRegistry>();

            writer = new BehaviorGraphWriter(graph, urls, null, new StubCurrentHttpRequest("http://server"));
        }
コード例 #6
0
        public void look_at_our_application()
        {
            var registry = new RestfulServicesRegistry();
            var writer
                = new BehaviorGraphWriter(registry.BuildGraph(), null, null);

            Debug.WriteLine(writer.PrintRoutes());
        }
コード例 #7
0
        public void look_at_our_application()
        {
            var registry = new RestfulServicesRegistry();
            var writer
                = new BehaviorGraphWriter(registry.BuildGraph(), null, null, new StubCurrentHttpRequest());

            Debug.WriteLine(writer.PrintRoutes());
        }
コード例 #8
0
 public AuthorizationDiagnosticWriter(BehaviorGraphWriter writer, BehaviorGraph graph)
 {
     _writer = writer;
     _graph = graph;
 }