static XElement BuildMembers(MemberTypeSection section, TypeDom type) { switch (section) { case MemberTypeSection.NestedTypes: return(BuildNestedTypes(type.NestedTypes)); case MemberTypeSection.Constructors: return(BuildMembers(Strings.Constructors, type.Constructors)); case MemberTypeSection.Properties: return(BuildMembers(Strings.Properties, type.Properties)); case MemberTypeSection.Methods: return(BuildMembers(Strings.Methods, type.Methods)); case MemberTypeSection.ExtentionMethods: return(BuildMembers(Strings.ExtentionMethods, type.ExtentionMethods, true)); case MemberTypeSection.Operators: return(BuildMembers(Strings.Operators, type.Operators)); case MemberTypeSection.Fields: return(BuildMembers(Strings.Fields, type.Fields)); case MemberTypeSection.Events: return(BuildMembers(Strings.Events, type.Events)); default: throw new Exception(); } }
public static string GetSectionName(MemberTypeSection section) { return(Names[section.ToString()]); }
public TypePartialData(TypeDom type, MemberTypeSection sectionType) { Type = type; SectionType = sectionType; }
static XElement BuildMembers(MemberTypeSection section, TypeDom type) { switch (section) { case MemberTypeSection.NestedTypes: return BuildNestedTypes(type.NestedTypes); case MemberTypeSection.Constructors: return BuildMembers(Strings.Constructors, type.Constructors); case MemberTypeSection.Properties: return BuildMembers(Strings.Properties, type.Properties); case MemberTypeSection.Methods: return BuildMembers(Strings.Methods, type.Methods); case MemberTypeSection.ExtentionMethods: return BuildMembers(Strings.ExtentionMethods, type.ExtentionMethods, true); case MemberTypeSection.Operators: return BuildMembers(Strings.Operators, type.Operators); case MemberTypeSection.Fields: return BuildMembers(Strings.Fields, type.Fields); case MemberTypeSection.Events: return BuildMembers(Strings.Events, type.Events); default: throw new Exception(); } }
private static void AddMembers(OfflineDynamicPage parentNode, TypeDom type, MemberDom[] members, MemberTypeSection section) { if (members == null || members.Length == 0) return; var sectionItem = new OfflineDynamicPage { Parent = parentNode, UrlPart = parentNode.UrlPart + "/" + section.ToString(), RussianTitle = GenerateHtml.GetSectionName(section), RussianContent = GenerateHtml.Generate(new TypePartialData { SectionType = section, Type = type }), }; if (section == MemberTypeSection.Methods || section == MemberTypeSection.ExtentionMethods) GenerateMethods((MethodDom[])members, sectionItem, parentNode.UrlPart); else { foreach (var member in members) { //ToDo: Группировка переопределенных методов. var memberItem = new OfflineDynamicPage { Parent = sectionItem, UrlPart = parentNode.UrlPart + "/" + member.SimpleName, RussianTitle = member.ShortSignature, RussianContent = GenerateHtml.Generate(member), }; sectionItem.Childs.Add(memberItem); } } parentNode.Childs.Add(sectionItem); }
private static void AddMembers(OfflineDynamicPage parentNode, TypeDom type, MemberDom[] members, MemberTypeSection section) { if (members == null || members.Length == 0) { return; } var sectionItem = new OfflineDynamicPage { Parent = parentNode, UrlPart = parentNode.UrlPart + "/" + section.ToString(), RussianTitle = GenerateHtml.GetSectionName(section), RussianContent = GenerateHtml.Generate(new TypePartialData { SectionType = section, Type = type }), }; if (section == MemberTypeSection.Methods || section == MemberTypeSection.ExtentionMethods) { GenerateMethods((MethodDom[])members, sectionItem, parentNode.UrlPart); } else { foreach (var member in members) { //ToDo: Группировка переопределенных методов. var memberItem = new OfflineDynamicPage { Parent = sectionItem, UrlPart = parentNode.UrlPart + "/" + member.SimpleName, RussianTitle = member.ShortSignature, RussianContent = GenerateHtml.Generate(member), }; sectionItem.Childs.Add(memberItem); } } parentNode.Childs.Add(sectionItem); }
public static string GetSectionName(MemberTypeSection section) { return Names[section.ToString()]; }