//----< creates a list of namespaces in all the files>----------------- public static List <CompareFiles> getNamespace(List <List <Elem> > allTables) { List <CompareFiles> ns = new List <CompareFiles>(); CompareFiles store; foreach (List <Elem> table in allTables) { foreach (Elem e in table) { if (e.type == "namespace") { store = new CompareFiles(); store.Filename = e.filename; store.Typename = e.name; ns.Add(store); } } } return(ns); }
//----< creates a list of type "using" type in all the files>----------------- public static List <CompareFiles> getUsing(List <List <Elem> > allTables) { List <CompareFiles> us = new List <CompareFiles>(); CompareFiles store; foreach (List <Elem> table in allTables) { foreach (Elem e in table) { if (e.type == "using" || e.type == "alias") { store = new CompareFiles(); store.Filename = e.filename; store.Typename = e.name; if (e.type == "alias" && !e.aliasname.StartsWith("System")) { store.Aliasname = e.aliasname; } us.Add(store); } } } return(us); }