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)
1709
Generator.
InterfaceDeclaration
("i"),
1713
Generator.
InterfaceDeclaration
("i", typeParameters: ["x", "y"]),
1717
Generator.
InterfaceDeclaration
("i", interfaceTypes: [Generator.IdentifierName("a")]),
1721
Generator.
InterfaceDeclaration
("i", interfaceTypes: [Generator.IdentifierName("a"), Generator.IdentifierName("b")]),
1725
Generator.
InterfaceDeclaration
("i", interfaceTypes: new SyntaxNode[] { }),
1729
Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1733
Generator.
InterfaceDeclaration
("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1737
Generator.
InterfaceDeclaration
("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.ReadOnly)]),
1741
Generator.
InterfaceDeclaration
("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)]),
1745
Generator.
InterfaceDeclaration
("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)]),
1749
Generator.
InterfaceDeclaration
("i", members: [Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1753
Generator.
InterfaceDeclaration
("i", members: [Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1757
Generator.
InterfaceDeclaration
("i", members: [Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
2005
Generator.
InterfaceDeclaration
("i"),
2137
Generator.
InterfaceDeclaration
("i"),
2239
Generator.
InterfaceDeclaration
("i"),
2860
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
InterfaceDeclaration
("i"), [Generator.MethodDeclaration("m")]));
2861
AssertMemberNamesEqual("", Generator.AddMembers(Generator.
InterfaceDeclaration
("i"), [Generator.OperatorDeclaration(OperatorKind.Addition)]));
2868
AssertMemberNamesEqual(["m", "m2"], Generator.AddMembers(Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]), [Generator.MethodDeclaration("m2")]));
2877
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2886
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2895
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2936
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2958
VerifySyntax<InterfaceDeclarationSyntax>(Generator.AddMembers(Generator.
InterfaceDeclaration
("i"),
2974
TestRemoveAllMembers(Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]));
2997
AssertMemberNamesEqual("m", Generator.
InterfaceDeclaration
("i", members: [Generator.MethodDeclaration("m")]));
3009
Assert.Equal(DeclarationKind.Interface, Generator.GetDeclarationKind(Generator.
InterfaceDeclaration
("i")));
3183
Generator.GetModifiers(Generator.WithModifiers(Generator.
InterfaceDeclaration
("i"), allModifiers)));
3423
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")}))