public IResourceLocatorFactory CloneForTagLib(ITagLib lib) { var f = new AssemblyLocatorFactory(_inAssembly, _filePrefix) { _lib = lib ?? _lib }; return(f); }
public DocumentModel BuildModel() { var assembly = Assembly.GetAssembly(typeof(DocumentationGenerator)); var prefix = assembly.GetName().Name.EndsWith("Documentation") ? "templates" : "Documentation.templates"; var locator = new AssemblyLocatorFactory(assembly, prefix).CloneForTagLib(_lib); var bundle = new ResourceBundle("Documentation", null, locator.GetNewLocator()); return new DocumentModel(_subject, _all, bundle, _specials); // var json = JsonConvert.SerializeObject(dm, new TypeJsonConverter(), new StringEnumConverter()); }
public IResourceLocatorFactory CloneForTagLib(ITagLib lib) { var f = new AssemblyLocatorFactory(_inAssembly, _filePrefix){ _lib = lib ?? _lib }; return f; }
public string GenerateDocumentation() { var assembly = Assembly.GetAssembly(typeof(DocumentationGenerator)); var prefix = assembly.GetName().Name.EndsWith("Documentation") ? "templates" : "Documentation.templates"; var locator = new AssemblyLocatorFactory(assembly, prefix).CloneForTagLib(_lib); var bundle = new ResourceBundle("Documentation", null, locator.GetNewLocator()); var template = locator.Handle(_fragment?"fragment.html":"index.htm", true); return template.Evaluate(new TagModel(new DocumentModel(_subject, _all, bundle, _specials))); }