/// <summary> /// Creates the property that can used to access the information from the given module. /// </summary> private PropertyDeclarationSyntax CreateProperty(Module module) { var summary = SyntaxEx.DocumentationSummary(module.Description); return(SyntaxEx.AutoPropertyDeclaration( new[] { SyntaxKind.PublicKeyword, SyntaxKind.AbstractKeyword }, GenerateMethodResultType(), ClassNameBase, isAbstract: true, setModifier: SyntaxKind.PrivateKeyword) .WithLeadingTrivia(Syntax.Trivia(SyntaxEx.DocumentationComment(summary)))); }
/// <summary> /// Generates a single property. /// </summary> protected PropertyDeclarationSyntax GenerateProperty( string name, ParameterType type, bool nullable = false, string description = null, bool multi = false) { var result = SyntaxEx.AutoPropertyDeclaration( new[] { SyntaxKind.PublicKeyword }, Wiki.TypeManager.GetTypeName(type, FixPropertyName(name), ClassNameBase, multi, nullable), GetPropertyName(name), SyntaxKind.PrivateKeyword); if (description != null) { result = result.WithDocumentationSummary(description); } return(result); }