/// <summary>A row with a function specification</summary> private static List <string> Row(Type type, IEnumerable <string> scope, MethodInfo methodInfo, FixtureDocumenter method, string documentation) { var namer = new GracefulNamer(methodInfo.Name); return(new List <string> { Report(new GracefulNamer(type.Namespace).Regrace), Report(new GracefulNamer(type.Name).Regrace), Report(string.Join(" ", scope)), Report(namer.Regrace), Report(namer.Type), Report(GracefulNamer.GracefulName(methodInfo.ReturnType)), Report(string.Join(", ", method.Parameters)), Report(string.Join(", ", method.TablesSupported)), Report(documentation) }); }
/// <summary>Add a documentation row of all constructors of the given type to the result list</summary> /// <remarks>Part of the Template pattern for DoTable</remarks> protected override void AddToList(List <object> result, Type type) { foreach (var methodInfo in MethodBaseDocumenter .RelevantMethods(type) .OrderBy(method => RealName(method.Name))) { var methodHelper = new FixtureDocumenter(methodInfo); var deprecationMessage = methodHelper.DeprecationMessage; var documentation = methodHelper.MethodBaseDocumentation; documentation = string.Empty + deprecationMessage + documentation; var scope = methodHelper.Scope; if (string.IsNullOrEmpty(documentation) && scope.Contains("internal")) { documentation = "[Internal use only. Do not use in tests]"; } result.Add(Row(type, scope, methodInfo, methodHelper, documentation)); } }