Esempio n. 1
0
        public void T3()
        {
            //ScriptCompiler.Init();
            string text    = @"
using System;
public class HelloWorld
{
}";
            var    visitor = SyntaxRootVisitor.CreateFrom(text);

            Assert.Equal(default, visitor.NamespaceName());
Esempio n. 2
0
        public void T1()
        {
            //ScriptCompiler.Init();
            string text    = @"
namespace HelloWorld
{
}";
            var    visitor = SyntaxRootVisitor.CreateFrom(text);

            Assert.Equal(0, visitor.UsingNames().Count());
        }
Esempio n. 3
0
        public void T2()
        {
            //ScriptCompiler.Init();
            string text    = @"using System;
namespace HelloWorld
{
}";
            var    visitor = SyntaxRootVisitor.CreateFrom(text);

            Assert.Equal("System", visitor.UsingNames().First());
            Assert.Equal($"using System;{Environment.NewLine}", visitor.UsingFullScripts().First());
        }