47 references to DelegateDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (24)
CodeGeneration\SyntaxGeneratorTests.cs (24)
1704Generator.DelegateDeclaration("d"), 1708Generator.DelegateDeclaration("d", returnType: Generator.IdentifierName("t")), 1712Generator.DelegateDeclaration("d", returnType: Generator.IdentifierName("t"), parameters: new[] { Generator.ParameterDeclaration("p", Generator.IdentifierName("pt")) }), 1716Generator.DelegateDeclaration("d", accessibility: Accessibility.Public), 1720Generator.DelegateDeclaration("d", accessibility: Accessibility.Public), 1724Generator.DelegateDeclaration("d", modifiers: DeclarationModifiers.New), 1728Generator.DelegateDeclaration("d", typeParameters: new[] { "T", "S" }), 1912Generator.DelegateDeclaration("d"), 2042Generator.DelegateDeclaration("d"), 2146Generator.DelegateDeclaration("d"), 2774Assert.Equal(DeclarationKind.Delegate, Generator.GetDeclarationKind(Generator.DelegateDeclaration("d"))); 2797Assert.Equal("d", Generator.GetName(Generator.DelegateDeclaration("d"))); 2820Assert.Equal("d", Generator.GetName(Generator.WithName(Generator.DelegateDeclaration("x"), "d"))); 2843Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.DelegateDeclaration("d", accessibility: Accessibility.Internal))); 2867Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.DelegateDeclaration("d", accessibility: Accessibility.Internal), Accessibility.Private))); 2891Assert.Equal(DeclarationModifiers.New, Generator.GetModifiers(Generator.DelegateDeclaration("d", modifiers: DeclarationModifiers.New))); 2914Assert.Equal(DeclarationModifiers.New, Generator.GetModifiers(Generator.WithModifiers(Generator.DelegateDeclaration("d"), DeclarationModifiers.New))); 2950Generator.GetModifiers(Generator.WithModifiers(Generator.DelegateDeclaration("d"), allModifiers))); 3101Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType: Generator.IdentifierName("t"))).ToString()); 3102Assert.Null(Generator.GetType(Generator.DelegateDeclaration("d"))); 3119Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.IdentifierName("t"))).ToString()); 3149Assert.Equal(0, Generator.GetParameters(Generator.DelegateDeclaration("d")).Count); 3150Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters: new[] { Generator.ParameterDeclaration("p", Generator.IdentifierName("t")) })).Count); 3166Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), new[] { Generator.ParameterDeclaration("p", Generator.IdentifierName("t")) })).Count);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (23)
CodeGeneration\SyntaxGeneratorTests.vb (23)
1614Generator.DelegateDeclaration("d"), 1618Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}), 1622Generator.DelegateDeclaration("d", returnType:=Generator.IdentifierName("t")), 1626Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, returnType:=Generator.IdentifierName("t")), 1630Generator.DelegateDeclaration("d", accessibility:=Accessibility.Public), 1635Generator.DelegateDeclaration("d", modifiers:=DeclarationModifiers.Static), 2236Generator.DelegateDeclaration("d"), 2526Assert.Equal(DeclarationKind.Delegate, Generator.GetDeclarationKind(Generator.DelegateDeclaration("d"))) 2551Assert.Equal("d", Generator.GetName(Generator.DelegateDeclaration("d"))) 2576Assert.Equal("d", Generator.GetName(Generator.WithName(Generator.DelegateDeclaration("x"), "d"))) 2601Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.DelegateDeclaration("d", accessibility:=Accessibility.Internal))) 2629Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.DelegateDeclaration("d", accessibility:=Accessibility.Internal), Accessibility.Private))) 2656Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.DelegateDeclaration("d", modifiers:=DeclarationModifiers.[New]))) 2678Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.WithModifiers(Generator.DelegateDeclaration("d"), DeclarationModifiers.[New]))) 2731Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("t"))).ToString()) 2732Assert.Null(Generator.GetType(Generator.DelegateDeclaration("d"))) 2749Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2750Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.IdentifierName("t"))).ToString()) 2781Generator.WithType(Generator.DelegateDeclaration("d", returnType:=Generator.IdentifierName("x")), Nothing), 2785Generator.WithType(Generator.DelegateDeclaration("d"), Generator.IdentifierName("x")), 2811Assert.Equal(0, Generator.GetParameters(Generator.DelegateDeclaration("d")).Count) 2812Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count) 2827Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)