コード例 #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);
            }
        }
コード例 #2
0
 internal IEnumerable <GitHubIssue> GetCommonIssues()
 {
     return(validIssues.Where(issue =>
                              IsTargetType(issue) &&
                              issue
                              .Labels
                              .Select(label => label.Name)
                              .All(name => !ToolkitTypes.GetIssueTypeNames()
                                   .Contains(name))));
 }
コード例 #3
0
        public static Documentation GetAnimationScriptsReference(string scriptsFolder)
        {
            var doc = new Documentation();

            foreach (var animationTypeName in ToolkitTypes.GetAnimationTypeNames())
            {
                doc.Add(GetAnimationScriptsReferenceForType(animationTypeName, scriptsFolder), ContentType.Text);
            }

            return(doc);
        }
コード例 #4
0
        public static Documentation Get(string type, string xmlDocFolder, string scriptsFolder)
        {
            if (ToolkitTypes.GetAnimationTypeNames().Contains(type))
            {
                var doc = new Documentation();
                doc.Add(GetAnimationScriptsReferenceForType(type, scriptsFolder), ContentType.Text);
                return(doc);
            }

            return(GetNonAnimationScriptsReference(type, xmlDocFolder, scriptsFolder));
        }
コード例 #5
0
        private void BuildSpecificIssues(IEnumerable <GitHubIssue> specificIssues)
        {
            foreach (var typeName in ToolkitTypes.GetIssueTypeNames())
            {
                var typeIssues = specificIssues.Where(issue => issue.Labels.Select(label => label.Name).Contains(typeName));

                if (typeIssues.Any())
                {
                    BuildTypeIssues(typeIssues, GetReadableTypeName(typeName));
                }
            }
        }
コード例 #6
0
        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);
            }
        }
コード例 #7
0
        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);
                }
            });
        }
コード例 #8
0
        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);
            }
        }
コード例 #9
0
 public ActionResult Index()
 {
     return(View(ToolkitTypes.GetTypeNames()));
 }
コード例 #10
0
 public static bool IsAnimationScriptsRelatedType(string typeName)
 {
     return(ToolkitTypes
            .GetAnimationTypeNames()
            .Contains(typeName));
 }
コード例 #11
0
 public static bool IsForceHeaderRendering(string typeName)
 {
     return(ToolkitTypes
            .GetAnimationTypeNames()
            .Contains(typeName));
 }
コード例 #12
0
 public ActionResult Index()
 {
     return(View(ToolkitTypes.GetTypeNames().Concat(ToolkitTypes.GetAnimationTypeNames())));
 }
コード例 #13
0
 internal IEnumerable <GitHubIssue> GetSpecificIssues()
 {
     return(validIssues.Where(issue => issue.Labels != null &&
                              IsTargetType(issue) &&
                              issue.Labels.Any(label => ToolkitTypes.GetIssueTypeNames().Contains(label.Name))));
 }