public void Cref1() { Test(@"/// <see cref=""Program{T}""/> class Program<T> { void Foo() { } }", XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("see"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("cref"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("\""), Class("Program"), Punctuation.OpenCurly, TypeParameter("T"), Punctuation.CloseCurly, XmlDoc.AttributeQuotes("\""), XmlDoc.Delimiter("/>"), Keyword("class"), Class("Program"), Punctuation.OpenAngle, TypeParameter("T"), Punctuation.CloseAngle, Punctuation.OpenCurly, Keyword("void"), Identifier("Foo"), Punctuation.OpenParen, Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, Punctuation.CloseCurly); }
public async Task CrefNamespaceIsNotClass() { await TestAsync( @"/// <see cref=""N""/> namespace N { class Program { } }", XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("see"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("cref"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("\""), Identifier("N"), XmlDoc.AttributeQuotes("\""), XmlDoc.Delimiter("/>"), Keyword("namespace"), Identifier("N"), Punctuation.OpenCurly, Keyword("class"), Class("Program"), Punctuation.OpenCurly, Punctuation.CloseCurly, Punctuation.CloseCurly); }
public void NameAttributeValue() { Test(@" class Program<T> { /// <param name=""x""/> void Foo(int x) { } }", Keyword("class"), Class("Program"), Punctuation.OpenAngle, TypeParameter("T"), Punctuation.CloseAngle, Punctuation.OpenCurly, XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("param"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("name"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("\""), Identifier("x"), XmlDoc.AttributeQuotes("\""), XmlDoc.Delimiter("/>"), Keyword("void"), Identifier("Foo"), Punctuation.OpenParen, Keyword("int"), Identifier("x"), Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, Punctuation.CloseCurly); }
public async Task XmlDocCref() { await TestAsync( @"/// <summary> /// <see cref=""MyClass.MyClass(int)""/> /// </summary> class MyClass { public MyClass(int x) { } }", XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("summary"), XmlDoc.Delimiter(">"), XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("see"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("cref"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("\""), Class("MyClass"), Operators.Dot, Identifier("MyClass"), Punctuation.OpenParen, Keyword("int"), Punctuation.CloseParen, XmlDoc.AttributeQuotes("\""), XmlDoc.Delimiter("/>"), XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("</"), XmlDoc.Name("summary"), XmlDoc.Delimiter(">"), Keyword("class"), Class("MyClass"), Punctuation.OpenCurly, Keyword("public"), Identifier("MyClass"), Punctuation.OpenParen, Keyword("int"), Identifier("x"), Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, Punctuation.CloseCurly ); }
public void Bug17819() { Test(@"_ _(){} ///<param name='_ }", Identifier("_"), Identifier("_"), Punctuation.OpenParen, Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, XmlDoc.Delimiter("///"), XmlDoc.Delimiter("<"), XmlDoc.Name("param"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("name"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("'"), Identifier("_"), Punctuation.CloseCurly); }
public async Task Cref1() { await TestAsync( @"/// <see cref=""Program{T}""/> class Program<T> { void Goo() { } }", XmlDoc.Delimiter("///"), XmlDoc.Text(" "), XmlDoc.Delimiter("<"), XmlDoc.Name("see"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("cref"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("\""), Class("Program"), Punctuation.OpenCurly, TypeParameter("T"), Punctuation.CloseCurly, XmlDoc.AttributeQuotes("\""), XmlDoc.Delimiter("/>"), Keyword("class"), Class("Program"), Punctuation.OpenAngle, TypeParameter("T"), Punctuation.CloseAngle, Punctuation.OpenCurly, Keyword("void"), Method("Goo"), Punctuation.OpenParen, Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, Punctuation.CloseCurly); }
public async Task Bug17819() { await TestAsync( @"_ _() { } ///<param name='_ }", Identifier("_"), Method("_"), Punctuation.OpenParen, Punctuation.CloseParen, Punctuation.OpenCurly, Punctuation.CloseCurly, XmlDoc.Delimiter("///"), XmlDoc.Delimiter("<"), XmlDoc.Name("param"), XmlDoc.AttributeName(" "), XmlDoc.AttributeName("name"), XmlDoc.Delimiter("="), XmlDoc.AttributeQuotes("'"), Identifier("_"), Punctuation.CloseCurly); }