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)
1675
Generator.
StructDeclaration
("s"),
1679
Generator.
StructDeclaration
("s", typeParameters: ["x", "y"]),
1683
Generator.
StructDeclaration
("s", interfaceTypes: [Generator.IdentifierName("x")]),
1687
Generator.
StructDeclaration
("s", interfaceTypes: [Generator.IdentifierName("x"), Generator.IdentifierName("y")]),
1691
Generator.
StructDeclaration
("s", interfaceTypes: new SyntaxNode[] { }),
1695
Generator.
StructDeclaration
("s", members: [Generator.FieldDeclaration("y", Generator.IdentifierName("x"))]),
1699
Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"))]),
1703
Generator.
StructDeclaration
("s", members: [Generator.ConstructorDeclaration("xxx")]),
2001
Generator.
StructDeclaration
("s"),
2133
Generator.
StructDeclaration
("s"),
2233
Generator.
StructDeclaration
("s"),
2861
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
StructDeclaration
("s"), [Generator.MethodDeclaration("m")]));
2869
AssertMemberNamesEqual(["m", "m2"], Generator.AddMembers(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]), [Generator.MethodDeclaration("m2")]));
2975
TestRemoveAllMembers(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]));
2982
TestRemoveMember(Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m1"), Generator.MethodDeclaration("m2")]), "m1", ["m2"]);
2998
AssertMemberNamesEqual("m", Generator.
StructDeclaration
("s", members: [Generator.MethodDeclaration("m")]));
3010
Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.
StructDeclaration
("s")));
3033
Assert.Equal("s", Generator.GetName(Generator.
StructDeclaration
("s")));
3056
Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.
StructDeclaration
("x"), "s")));
3079
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal)));
3103
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal), Accessibility.Private)));
3128
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.
StructDeclaration
("s", modifiers: DeclarationModifiers.Partial)));
3151
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), DeclarationModifiers.Partial)));
3181
Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), allModifiers)));
3424
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
(