38 references to StructDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpStructSnippetProvider.cs (1)
49return (StructDeclarationSyntax)generator.StructDeclaration(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (15)
CodeGeneration\SyntaxGeneratorTests.cs (15)
1574Generator.StructDeclaration("s"), 1590Generator.StructDeclaration("s", interfaceTypes: new SyntaxNode[] { }), 1900Generator.StructDeclaration("s"), 2030Generator.StructDeclaration("s"), 2130Generator.StructDeclaration("s"), 2750AssertMemberNamesEqual("m", Generator.AddMembers(Generator.StructDeclaration("s"), [Generator.MethodDeclaration("m")])); 2875Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.StructDeclaration("s"))); 2898Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s"))); 2921Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s"))); 2944Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.StructDeclaration("s", accessibility: Accessibility.Internal))); 2968Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility: Accessibility.Internal), Accessibility.Private))); 2993Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.StructDeclaration("s", modifiers: DeclarationModifiers.Partial))); 3016Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial))); 3046Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), allModifiers))); 3273Assert.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)
1451Generator.StructDeclaration("s"), 1456Generator.StructDeclaration("s", typeParameters:={"x", "y"}), 1461Generator.StructDeclaration("s", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Partial), 1466Generator.StructDeclaration("s", interfaceTypes:={Generator.IdentifierName("x")}), 1473Generator.StructDeclaration("s", interfaceTypes:={Generator.IdentifierName("x"), Generator.IdentifierName("y")}), 1480Generator.StructDeclaration("s", interfaceTypes:={}), 1485Generator.StructDeclaration("s", members:={Generator.FieldDeclaration("y", Generator.IdentifierName("x"))}), 1492Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"))}), 1500Generator.StructDeclaration("s", 1939Generator.StructDeclaration("s"), 2076Generator.StructDeclaration("s"), 2567Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.StructDeclaration("s"))) 2592Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s"))) 2617Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s"))) 2642Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.StructDeclaration("s", accessibility:=Accessibility.Internal))) 2670Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility:=Accessibility.Internal), Accessibility.Private))) 2698Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.StructDeclaration("s", modifiers:=DeclarationModifiers.Partial))) 2720Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial))) 3159AssertMemberNamesEqual("m", Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")})) 3169AssertMemberNamesEqual("m", Generator.AddMembers(Generator.StructDeclaration("s"), {Generator.MethodDeclaration("m")})) 3176AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")})) 3186TestRemoveAllMembers(Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")}))