public void ParseTest4() { const string code = @" [SomeAttribute(""value1"", ""value2"")] [SomeOtherAttribute(Foo:""value1"", BaDang:""value2"")] class SimpleClass1 { }"; var tree = CSharpSyntaxTree.ParseText(code); var writer = new ConsoleDumpWalker(); writer.Visit(tree.GetRoot()); }
public void ParseTest3() { const string code = @" class SimpleClass1 : BaseClass, ISomething, ISomethingElse { } class SimpleClass2 { }"; var tree = CSharpSyntaxTree.ParseText(code); var writer = new ConsoleDumpWalker(); writer.Visit(tree.GetRoot()); }
public void ParseTest5() { const string code = @" [SomeAttribute(SimpleClass1.Const)] [SomethingElse(Foo.Blue|Foo.Red|Foo.Pink)] [SomethingElse(Foo.Blue)] class SimpleClass1 { public const string Const = ""const""; }"; var tree = CSharpSyntaxTree.ParseText(code); var writer = new ConsoleDumpWalker(); writer.Visit(tree.GetRoot()); }
public void ParseTest1() { const string code = @" [assembly: Nevgyt(""yop"")] [Fooxy(""yop"")] class SimpleClass { [Funky(""yop"")] public void SimpleMethod() { var list = new List<string>(); list.Add(""first""); list.Add(""second""); var result = from item in list where item == ""first"" select item; } }"; var tree = CSharpSyntaxTree.ParseText(code); var writer = new ConsoleDumpWalker(); writer.Visit(tree.GetRoot()); }