public IEnumerable <DocumentationType> GetTypes() { return(DocumentationGenerator .FindTypes(IsTypeIncluded) .Select(type => new DocumentationType(type, this)) .OrderBy(type => type.Name)); }
public void Generate(string outputFolder) { var types = DocumentationGenerator.FindTypes(type => !type.IsEnum && DocumentationGenerator.IsTypeIncluded(type, IncludedTypes, IncludedNamespaces, ExcludedNamespaces)); var warnings = GenerateLogDescriptions(types, _warningFieldSuffix, MessageTemplate); var errors = GenerateLogDescriptions(types, _errorFieldSuffix, MessageTemplate); var content = DocumentTemplate .Replace(_logWarningsTag, warnings) .Replace(_logErrorsTag, errors); DocumentationGenerator.WriteFile(outputFolder, OutputFile, content); }
public void Validate() { var types = DocumentationGenerator.FindTypes(type => DocumentationGenerator.IsTypeIncluded(type, DocumentationTypeCategory.Asset | DocumentationTypeCategory.Behaviour, IncludedNamespaces, ExcludedNamespaces)); foreach (var type in types) { var id = DocumentationGenerator.GetTypeId(type); var url = UrlRoot + id; var attribute = type.GetAttribute <HelpURLAttribute>(); if (attribute == null) { Debug.LogWarningFormat(_missingHelpUrlWarning, type.Name); } else if (attribute.URL != url) { Debug.LogWarningFormat(_invalidHelpUrlWarning, type.Name, attribute.URL, url); } } }