Blackmire.CppHeaderWalker.VisitUsingDirective C# (CSharp) Method

VisitUsingDirective() public method

public VisitUsingDirective ( UsingDirectiveSyntax node ) : void
node UsingDirectiveSyntax
return void
        public override void VisitUsingDirective(UsingDirectiveSyntax node)
        {
            // these could theoretically be acquired by indexing the GAC or something
              var namespaces = new List<String>
              {
            "System",
            "System.Collections",
            "System.Collections.Generic",
            "System.Text",
            "System.Linq"
              };
              string whatAreWeUsing = node.Name.ToString();
              if (!namespaces.Contains(whatAreWeUsing))
              {
            var parts = whatAreWeUsing.Split('.');
            cb.AppendIndent().Append("using namespace ").Append(string.Join("::", parts)).AppendLine(";");
              }
        }