Example #1
0
        private void RenderFromDocAttributes(ControllerContext context)
        {
            StringBuilder output = new StringBuilder();
            Dictionary <string, List <DocInfo> > documentation = new Dictionary <string, List <DocInfo> >();

            if (ClassNames.Length > 0)
            {
                Incubator             container = ServiceContainer;
                HttpServerUtilityBase server    = context.HttpContext.Server;
                ClassNames.Each(cn =>
                {
                    Type type     = container[cn];
                    documentation = DocInfo.FromDocAttributes(type);
                });
            }

            if (Renderer != null)
            {
                Renderer(documentation, output);
                context.HttpContext.Response.Write(output.ToString());
            }
            else
            {
                context.HttpContext.Response.Write("Attribute documentation renderer not specified.  Set DocResult.AttributeRenderer per request or set DocResult.DefaultAttributeRenderer for global effect");
            }
        }