public static StatementDocumentation FromReflection(ReflectionStatementDefinition reflectionStatementDefinition, ICommentDocumentation commentDocumentation)
 {
     var methodDocs = commentDocumentation.ForMethod(reflectionStatementDefinition.MethodInfo);
     return new StatementDocumentation() {
         Parameters = (reflectionStatementDefinition.Parameters ?? Enumerable.Empty<StatementParameter>())
                       .Select(p => new ParameterDocumentation(){
                           Name = p.Name,
                           Type = p.Type,
                           Description = methodDocs.With(d => d.Parameters.With(p.Name)),
                           TransformsTo = (p as ProceedParameter).With(z => z.TransformsTo)
                       })
                       .ToList(),
         Description = methodDocs.With(x => x.Summary),
         ScopeType = reflectionStatementDefinition.ScopeType,
         Title = ExtractTitle(reflectionStatementDefinition)
     };
 }
Beispiel #2
0
 public DocumentationSet(StatementSet statements, ICommentDocumentation commentDocumentation)
 {
     this.statements = statements;
     this.commentDocumentation = commentDocumentation;
 }
Beispiel #3
0
        public static StatementDocumentation FromReflection(ReflectionStatementDefinition reflectionStatementDefinition, ICommentDocumentation commentDocumentation)
        {
            var methodDocs = commentDocumentation.ForMethod(reflectionStatementDefinition.MethodInfo);

            return(new StatementDocumentation()
            {
                Parameters = (reflectionStatementDefinition.Parameters ?? Enumerable.Empty <StatementParameter>())
                             .Select(p => new ParameterDocumentation()
                {
                    Name = p.Name,
                    Type = p.Type,
                    Description = methodDocs.With(d => d.Parameters.With(p.Name)),
                    TransformsTo = (p as ProceedParameter).With(z => z.TransformsTo)
                })
                             .ToList(),
                Description = methodDocs.With(x => x.Summary),
                ScopeType = reflectionStatementDefinition.ScopeType,
                Title = ExtractTitle(reflectionStatementDefinition)
            });
        }
Beispiel #4
0
 public DocumentationSet(StatementSet statements, ICommentDocumentation commentDocumentation)
 {
     this.statements           = statements;
     this.commentDocumentation = commentDocumentation;
 }