48 references to InterfaceDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpInterfaceSnippetProvider.cs (1)
47
return (InterfaceDeclarationSyntax)generator.
InterfaceDeclaration
(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (29)
CodeGeneration\SyntaxGeneratorTests.cs (29)
1692
Generator.
InterfaceDeclaration
("i"),
1696
Generator.
InterfaceDeclaration
("i", typeParameters: ["x", "y"]),
1700
Generator.
InterfaceDeclaration
("i", interfaceTypes: [Generator.IdentifierName("a")]),
1704
Generator.
InterfaceDeclaration
("i", interfaceTypes: [Generator.IdentifierName("a"), Generator.IdentifierName("b")]),
1708
Generator.
InterfaceDeclaration
("i", interfaceTypes: new SyntaxNode[] { }),
1712
Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1716
Generator.
InterfaceDeclaration
("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1720
Generator.
InterfaceDeclaration
("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.ReadOnly)]),
1724
Generator.
InterfaceDeclaration
("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)]),
1728
Generator.
InterfaceDeclaration
("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)]),
1732
Generator.
InterfaceDeclaration
("i", members: [Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1736
Generator.
InterfaceDeclaration
("i", members: [Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1740
Generator.
InterfaceDeclaration
("i", members: [Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1988
Generator.
InterfaceDeclaration
("i"),
2118
Generator.
InterfaceDeclaration
("i"),
2220
Generator.
InterfaceDeclaration
("i"),
2833
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
InterfaceDeclaration
("i"), [Generator.MethodDeclaration("m")]));
2834
AssertMemberNamesEqual("", Generator.AddMembers(Generator.
InterfaceDeclaration
("i"), [Generator.OperatorDeclaration(OperatorKind.Addition)]));
2841
AssertMemberNamesEqual(["m", "m2"], Generator.AddMembers(Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]), [Generator.MethodDeclaration("m2")]));
2850
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2859
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2868
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2885
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2907
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2923
TestRemoveAllMembers(Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]));
2946
AssertMemberNamesEqual("m", Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]));
2958
Assert.Equal(DeclarationKind.Interface, Generator.GetDeclarationKind(Generator.
InterfaceDeclaration
("i")));
3132
Generator.GetModifiers(Generator.WithModifiers(Generator.
InterfaceDeclaration
("i"), allModifiers)));
3356
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.
InterfaceDeclaration
("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (18)
CodeGeneration\SyntaxGeneratorTests.vb (18)
1512
Generator.
InterfaceDeclaration
("i"),
1517
Generator.
InterfaceDeclaration
("i", typeParameters:={"x", "y"}),
1522
Generator.
InterfaceDeclaration
("i", interfaceTypes:={Generator.IdentifierName("a")}),
1529
Generator.
InterfaceDeclaration
("i", interfaceTypes:={Generator.IdentifierName("a"), Generator.IdentifierName("b")}),
1536
Generator.
InterfaceDeclaration
("i", interfaceTypes:={}),
1541
Generator.
InterfaceDeclaration
("i", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1549
Generator.
InterfaceDeclaration
("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1557
Generator.
InterfaceDeclaration
("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.ReadOnly)}),
1565
Generator.
InterfaceDeclaration
("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)}),
1573
Generator.
InterfaceDeclaration
("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}),
1946
Generator.
InterfaceDeclaration
("i"),
2086
Generator.
InterfaceDeclaration
("i"),
2568
Assert.Equal(DeclarationKind.Interface, Generator.GetDeclarationKind(Generator.
InterfaceDeclaration
("i")))
2643
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
InterfaceDeclaration
("i", accessibility:=Accessibility.Internal)))
3160
AssertMemberNamesEqual("m", Generator.
InterfaceDeclaration
("i", members:={Generator.MethodDeclaration("m")}))
3170
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
InterfaceDeclaration
("i"), {Generator.MethodDeclaration("m")}))
3177
AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.
InterfaceDeclaration
("i", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")}))
3187
TestRemoveAllMembers(Generator.
InterfaceDeclaration
("i", members:={Generator.MethodDeclaration("m")}))