/// <summary> /// Get the code generation options that have been set at the model level /// </summary> public IDocumentationGenerationOptions GetDocumentationGenerationOptions() { System.IO.DirectoryInfo DirectoryRootIn = null; if (!string.IsNullOrWhiteSpace(this.DocumentationRootFolder)) { if (System.IO.Directory.Exists(this.DocumentationRootFolder)) { DirectoryRootIn = new System.IO.DirectoryInfo(this.DocumentationRootFolder); } else { // Can you make this into a relative path?? if (!System.IO.Path.IsPathRooted(this.DocumentationRootFolder)) { DirectoryRootIn = new System.IO.DirectoryInfo( System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory , this.DocumentationRootFolder)); } } } else { DirectoryRootIn = new System.IO.DirectoryInfo(System.IO.Path.Combine(System.IO.Path.GetTempPath(), this.Name, "Documentation")); } return(DocumentationGenerationOptions.Create(DirectoryRootIn)); }
internal void OnMenuGenerateCQRSModelDocumentation(object sender, EventArgs e) { if (null != GetCurrentCQRSModel()) { CQRSAzure.CQRSdsl.CustomCode.Interfaces.IDocumentationGenerationOptions options = GetCurrentCQRSModel().GetDocumentationGenerationOptions(); if (null == options) { options = DocumentationGenerationOptions.Create(new System.IO.DirectoryInfo(GetCurrentCQRSModel().DocumentationRootFolder)); } // Document the specified model... DocumentationGeneration.ModelDocumentationGenerator modelDoc = new DocumentationGeneration.ModelDocumentationGenerator(GetCurrentCQRSModel(), options); if (null != modelDoc) { modelDoc.GenerateDocumentation(); } } }