Пример #1
0
        private List<UsingList> TraverseUsingList()
        {
            List<UsingList> retUL = new List<UsingList>();
            var usings = mRoot.Imports;
            foreach (ImportsStatementSyntax uds in usings)
            {
                UsingList ul = new UsingList();
                ul.LibName = uds.ImportsClauses.ToFullString();
                ul.Identifier = ""; //??
            }

            return retUL;
        }
Пример #2
0
        private List<UsingList> TraverseUsingList()
        {
            List<UsingList> retUL = new List<UsingList>();
            var usings = (SyntaxList<UsingDirectiveSyntax>)mRoot.Usings;
            foreach (UsingDirectiveSyntax uds in usings)
            {
                UsingList ul = new UsingList();
                ul.LibName = uds.Name.ToString();
                if (uds.HasLeadingTrivia)
                {
                    SetOuterComments(ul, uds.GetLeadingTrivia().ToFullString());
                }

                if (uds.HasTrailingTrivia)
                {
                    SetInnerComments(ul, uds.GetTrailingTrivia().ToFullString());
                }
                ul.Identifier = ""; //??
            }

            return retUL;
        }