39 references to StructDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpStructSnippetProvider.cs (1)
49
return (StructDeclarationSyntax)generator.
StructDeclaration
(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (15)
CodeGeneration\SyntaxGeneratorTests.cs (15)
1656
Generator.
StructDeclaration
("s"),
1672
Generator.
StructDeclaration
("s", interfaceTypes: new SyntaxNode[] { }),
1982
Generator.
StructDeclaration
("s"),
2112
Generator.
StructDeclaration
("s"),
2212
Generator.
StructDeclaration
("s"),
2832
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
StructDeclaration
("s"), [Generator.MethodDeclaration("m")]));
2957
Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.
StructDeclaration
("s")));
2980
Assert.Equal("s", Generator.GetName(Generator.
StructDeclaration
("s")));
3003
Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.
StructDeclaration
("x"), "s")));
3026
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal)));
3050
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
StructDeclaration
("s", accessibility: Accessibility.Internal), Accessibility.Private)));
3075
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.
StructDeclaration
("s", modifiers: DeclarationModifiers.Partial)));
3098
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), DeclarationModifiers.Partial)));
3128
Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), allModifiers)));
3355
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.
StructDeclaration
("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (22)
CodeGeneration\SyntaxGeneratorTests.vb (22)
1451
Generator.
StructDeclaration
("s"),
1456
Generator.
StructDeclaration
("s", typeParameters:={"x", "y"}),
1461
Generator.
StructDeclaration
("s", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Partial),
1466
Generator.
StructDeclaration
("s", interfaceTypes:={Generator.IdentifierName("x")}),
1473
Generator.
StructDeclaration
("s", interfaceTypes:={Generator.IdentifierName("x"), Generator.IdentifierName("y")}),
1480
Generator.
StructDeclaration
("s", interfaceTypes:={}),
1485
Generator.
StructDeclaration
("s", members:={Generator.FieldDeclaration("y", Generator.IdentifierName("x"))}),
1492
Generator.
StructDeclaration
("s", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"))}),
1500
Generator.
StructDeclaration
("s",
1939
Generator.
StructDeclaration
("s"),
2076
Generator.
StructDeclaration
("s"),
2567
Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.
StructDeclaration
("s")))
2592
Assert.Equal("s", Generator.GetName(Generator.
StructDeclaration
("s")))
2617
Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.
StructDeclaration
("x"), "s")))
2642
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
StructDeclaration
("s", accessibility:=Accessibility.Internal)))
2670
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
StructDeclaration
("s", accessibility:=Accessibility.Internal), Accessibility.Private)))
2698
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.
StructDeclaration
("s", modifiers:=DeclarationModifiers.Partial)))
2720
Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.
StructDeclaration
("s"), DeclarationModifiers.Partial)))
3159
AssertMemberNamesEqual("m", Generator.
StructDeclaration
("s", members:={Generator.MethodDeclaration("m")}))
3169
AssertMemberNamesEqual("m", Generator.AddMembers(Generator.
StructDeclaration
("s"), {Generator.MethodDeclaration("m")}))
3176
AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.
StructDeclaration
("s", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")}))
3186
TestRemoveAllMembers(Generator.
StructDeclaration
("s", members:={Generator.MethodDeclaration("m")}))
Roslyn.Diagnostics.Analyzers (1)
AbstractCreateTestAccessor`1.cs (1)
90
var testAccessorType = syntaxGenerator.
StructDeclaration
(