/// <summary> /// Gets the voids. /// </summary> /// <param name="type">The type.</param> /// <returns></returns> private static List <Models.Void> GetVoids(Type type) { List <Models.Void> voids = new List <Models.Void>(); type.GetMethods().ToList().Where((x) => x.ReturnType == typeof(void)).ToList().ForEach((n) => { if ((!n.Name.Contains("get_")) && (!n.Name.Contains("set_"))) { var _void = new Models.Void { Name = n.Name, Inputs = GetOverloads(n), Modifier = SetModifier(n) }; _void.Documentation = DocumentService.GetVoidDocumentation(type.Namespace, type.Name, _void); voids.Add(_void); } }); return(voids); }
internal static string GetVoidDocumentation(string @namespace, string @class, Models.Void @void) { string inputs = ""; @void.Inputs.ForEach((x) => { inputs += "[" + string.Format("{0}: {1}", x.Name, Regex.Replace(x.Type.Name, Reflector.TypingSetter, "[]")) + "]"; }); return(string.Format(Templates.VoidTemplate, @void.Name, (string.IsNullOrEmpty(inputs) ? "N/A" : inputs), GetXmlDocumentation(@namespace, @class, @void.Name, @void.Inputs).Sanitize())); }