27 references to StructDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpStructSnippetProvider.cs (1)
49
return (StructDeclarationSyntax)generator.
StructDeclaration
(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
CodeGeneration\SyntaxGeneratorTests.cs (25)
1673
Generator.
StructDeclaration
("s"),
1677
Generator.
StructDeclaration
("s", typeParameters: ["x", "y"]),
1681
Generator.
StructDeclaration
("s", interfaceTypes: [Generator.IdentifierName("x")]),
1685
Generator.
StructDeclaration
("s", interfaceTypes: [Generator.IdentifierName("x"), Generator.IdentifierName("y")]),
1689
Generator.
StructDeclaration
("s", interfaceTypes: new SyntaxNode[] { }),
1693
Generator.
StructDeclaration
("s", members: [Generator.FieldDeclaration("y", Generator.IdentifierName("x"))]),
1697
Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"))]),
1701
Generator.
StructDeclaration
("s", members: [Generator.ConstructorDeclaration("xxx")]),
1999
Generator.
StructDeclaration
("s"),
2131
Generator.
StructDeclaration
("s"),
2231
Generator.
StructDeclaration
("s"),
2859
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
StructDeclaration
("s"), [Generator.MethodDeclaration("m")]));
2867
AssertMemberNamesEqual(["m", "m2"], Generator.AddMembers(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]), [Generator.MethodDeclaration("m2")]));
2973
TestRemoveAllMembers(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]));
2980
TestRemoveMember(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m1"), Generator.MethodDeclaration("m2")]), "m1", ["m2"]);
2996
AssertMemberNamesEqual("m", Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]));
3008
Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.
StructDeclaration
("s")));
3031
Assert.Equal("s", Generator.GetName(Generator.
StructDeclaration
("s")));
3054
Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.
StructDeclaration
("x"), "s")));
3077
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal)));
3101
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal), Accessibility.Private)));
3126
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.
StructDeclaration
("s", modifiers: DeclarationModifiers.Partial)));
3149
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), DeclarationModifiers.Partial)));
3179
Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), allModifiers)));
3422
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.
StructDeclaration
("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
Roslyn.Diagnostics.Analyzers (1)
AbstractCreateTestAccessor`1.cs (1)
90
var testAccessorType = syntaxGenerator.
StructDeclaration
(