Example #1
0
        static void Main(string[] args)
        {
            var wikiRepoPath  = args[0];
            var xmlDocFolder  = GetXmlDocFolder();
            var scriptsFolder = GetScriptFolder();
            var docRenderer   = new GitHubDocRenderer();
            var typeNames     = ToolkitTypes.GetTypeNames().Concat(ToolkitTypes.GetAnimationTypeNames());

            foreach (var typeName in typeNames)
            {
                var renderSampleSiteLink = Documentation.IsRenderSampleSiteLink(typeName);
                var forceHeaderRendering = Documentation.IsForceHeaderRendering(typeName);
                var extenderDoc          = new ExtenderDoc(docRenderer, renderSampleSiteLink, forceHeaderRendering);
                var doc = Documentation.Get(typeName, xmlDocFolder, scriptsFolder);

                Documentation animationDocs = null;
                if (Documentation.IsAnimationScriptsRelatedType(typeName))
                {
                    animationDocs = Documentation.GetAnimationScriptsReference(scriptsFolder);
                }

                var markup           = extenderDoc.BuildDoc(doc.Types, animationDocs?.Types);
                var markdownFilePath = Path.Combine(wikiRepoPath, typeName + ".md");
                File.WriteAllText(markdownFilePath, markup);

                var htmlDescripton = new HtmlDocRenderer().RenderDescription(doc.Types.FirstOrDefault().Summary);
                SaveHtmlDescription(typeName, htmlDescripton);
                var htmlProperties = new HtmlDocRenderer().RenderMembers(doc.Types.FirstOrDefault());
                SaveHtmlProperties(typeName, htmlProperties);
            }
        }
Example #2
0
 public HelpTileViewModel(DocumentationViewModel parent, HelpEntry entry)
 {
     _entry         = entry;
     _icon          = IconFactory.GetHighImage(entry.Topic.Kind);
     _documentation = parent.Help;
     _clicked       = new RelayCommand(x =>
     {
         var topic    = _documentation.Get(_entry.Name);
         parent.Topic = topic;
     });
 }
Example #3
0
        public ContentResult Markup(string id)
        {
            var typeName      = id;
            var xmlDocFolder  = Server.MapPath("~/bin/");
            var scriptsFolder = Server.MapPath("~/bin/Scripts/");
            var doc           = Documentation.Get(typeName, xmlDocFolder, scriptsFolder);

            var docRenderer = new GitHubDocRenderer();
            var extenderDoc = new ExtenderDoc(docRenderer);
            var markup      = extenderDoc.BuildDoc(doc.Types);

            return(Content(markup));
        }
        static void Main(string[] args)
        {
            var wikiRepoPath  = args[0];
            var xmlDocFolder  = GetXmlDocFolder();
            var scriptsFolder = GetScriptFolder();
            var docRenderer   = new GitHubDocRenderer();
            var extenderDoc   = new ExtenderDoc(docRenderer);

            var typeNames = ToolkitTypes.GetTypeNames();

            foreach (var typeName in typeNames)
            {
                var doc              = Documentation.Get(typeName, xmlDocFolder, scriptsFolder);
                var markup           = extenderDoc.BuildDoc(doc.Types);
                var markdownFilePath = Path.Combine(wikiRepoPath, typeName.Replace("Extender", "") + ".md");
                File.WriteAllText(markdownFilePath, markup);
            }
        }
        public void DocumentationConsistent()
        {
            var typeNames     = ToolkitTypes.GetTypeNames();
            var xmlDocFolder  = GetXmlDocFolder();
            var scriptsFolder = GetScriptFolder();

            foreach (var typeName in typeNames)
            {
                Documentation.Get(typeName, xmlDocFolder, scriptsFolder);
            }

            Assert.DoesNotThrow(() => {
                foreach (var typeName in typeNames)
                {
                    Documentation.Get(typeName, xmlDocFolder, scriptsFolder);
                }
            });
        }
Example #6
0
    public void PreClassesHook()
    {
        IDictionary <string, string> documentation = Documentation.Get(Data.Docs);

        foreach (CodeTypeDeclaration type in from smokeType in this.Data.SmokeTypeMap
                 where string.IsNullOrEmpty((string)smokeType.Value.UserData["parent"])
                 select smokeType.Value)
        {
            foreach (CodeTypeDeclaration nestedType in type.Members.OfType <CodeTypeDeclaration>().Where(t => !t.IsEnum))
            {
                this.GetClassDocs(nestedType, string.Format("{0}::{1}", type.Name, nestedType.Name),
                                  string.Format("{0}-{1}", type.Name, nestedType.Name), documentation);
            }
            this.GetClassDocs(type, type.Name, type.Name, documentation);
        }
        PropertyGenerator pg = new PropertyGenerator(Data, Translator, this.memberDocumentation);

        pg.Run();
    }
Example #7
0
        public ContentResult Markup(string id)
        {
            var typeName             = id;
            var xmlDocFolder         = Server.MapPath("~/bin/");
            var scriptsFolder        = Server.MapPath("~/bin/Scripts/");
            var doc                  = Documentation.Get(typeName, xmlDocFolder, scriptsFolder);
            var docRenderer          = new GitHubDocRenderer();
            var renderSampleSiteLink = Documentation.IsRenderSampleSiteLink(typeName);
            var forceHeaderRendering = Documentation.IsForceHeaderRendering(typeName);
            var extenderDoc          = new ExtenderDoc(docRenderer, renderSampleSiteLink, forceHeaderRendering);

            Documentation animationDocs = null;

            if (Documentation.IsAnimationScriptsRelatedType(typeName))
            {
                animationDocs = Documentation.GetAnimationScriptsReference(scriptsFolder);
            }

            var markup = extenderDoc.BuildDoc(doc.Types, animationDocs?.Types);

            return(Content(markup));
        }
        static void Main(string[] args)
        {
            var wikiRepoPath  = args[0];
            var xmlDocFolder  = GetXmlDocFolder();
            var scriptsFolder = GetScriptFolder();
            var docRenderer   = new GitHubDocRenderer();
            var extenderDoc   = new ExtenderDoc(docRenderer);

            var typeNames = ToolkitTypes.GetTypeNames();

            foreach (var typeName in typeNames)
            {
                var doc              = Documentation.Get(typeName, xmlDocFolder, scriptsFolder);
                var markup           = extenderDoc.BuildDoc(doc.Types);
                var markdownFilePath = Path.Combine(wikiRepoPath, typeName.Replace("Extender", "") + ".md");
                File.WriteAllText(markdownFilePath, markup);

                var htmlDescripton = new HtmlDocRenderer().RenderDescription(doc.Types.FirstOrDefault().Summary);
                SaveHtmlDescription(typeName, htmlDescripton);
                var htmlProperties = new HtmlDocRenderer().RenderMembers(doc.Types.FirstOrDefault());
                SaveHtmlProperties(typeName, htmlProperties);
            }
        }