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); } }
internal IEnumerable <GitHubIssue> GetCommonIssues() { return(validIssues.Where(issue => IsTargetType(issue) && issue .Labels .Select(label => label.Name) .All(name => !ToolkitTypes.GetIssueTypeNames() .Contains(name)))); }
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); }
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)); }
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)); } } }
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); } }); }
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); } }
public ActionResult Index() { return(View(ToolkitTypes.GetTypeNames())); }
public static bool IsAnimationScriptsRelatedType(string typeName) { return(ToolkitTypes .GetAnimationTypeNames() .Contains(typeName)); }
public static bool IsForceHeaderRendering(string typeName) { return(ToolkitTypes .GetAnimationTypeNames() .Contains(typeName)); }
public ActionResult Index() { return(View(ToolkitTypes.GetTypeNames().Concat(ToolkitTypes.GetAnimationTypeNames()))); }
internal IEnumerable <GitHubIssue> GetSpecificIssues() { return(validIssues.Where(issue => issue.Labels != null && IsTargetType(issue) && issue.Labels.Any(label => ToolkitTypes.GetIssueTypeNames().Contains(label.Name)))); }