27 references to StructDeclaration
Microsoft.CodeAnalysis.CSharp.Features (1)
Snippets\CSharpStructSnippetProvider.cs (1)
49return (StructDeclarationSyntax)generator.StructDeclaration(name);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
CodeGeneration\SyntaxGeneratorTests.cs (25)
1675Generator.StructDeclaration("s"), 1679Generator.StructDeclaration("s", typeParameters: ["x", "y"]), 1683Generator.StructDeclaration("s", interfaceTypes: [Generator.IdentifierName("x")]), 1687Generator.StructDeclaration("s", interfaceTypes: [Generator.IdentifierName("x"), Generator.IdentifierName("y")]), 1691Generator.StructDeclaration("s", interfaceTypes: new SyntaxNode[] { }), 1695Generator.StructDeclaration("s", members: [Generator.FieldDeclaration("y", Generator.IdentifierName("x"))]), 1699Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"))]), 1703Generator.StructDeclaration("s", members: [Generator.ConstructorDeclaration("xxx")]), 2001Generator.StructDeclaration("s"), 2133Generator.StructDeclaration("s"), 2233Generator.StructDeclaration("s"), 2861AssertMemberNamesEqual("m", Generator.AddMembers(Generator.StructDeclaration("s"), [Generator.MethodDeclaration("m")])); 2869AssertMemberNamesEqual(["m", "m2"], Generator.AddMembers(Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m")]), [Generator.MethodDeclaration("m2")])); 2975TestRemoveAllMembers(Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m")])); 2982TestRemoveMember(Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m1"), Generator.MethodDeclaration("m2")]), "m1", ["m2"]); 2998AssertMemberNamesEqual("m", Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m")])); 3010Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.StructDeclaration("s"))); 3033Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s"))); 3056Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s"))); 3079Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.StructDeclaration("s", accessibility: Accessibility.Internal))); 3103Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility: Accessibility.Internal), Accessibility.Private))); 3128Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.StructDeclaration("s", modifiers: DeclarationModifiers.Partial))); 3151Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial))); 3181Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), allModifiers))); 3424Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.StructDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
Roslyn.Diagnostics.Analyzers (1)
AbstractCreateTestAccessor`1.cs (1)
90var testAccessorType = syntaxGenerator.StructDeclaration(