166 references to ParameterDeclaration
Microsoft.Analyzers.Extra (4)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (4)
373
var loggerParam = gen.
ParameterDeclaration
("logger", loggerType);
386
parameters.Add(gen.
ParameterDeclaration
("exception", gen.TypeExpression(invocationOp.Arguments[details.ExceptionParamIndex].Value.Type!)));
394
parameters.Add(gen.
ParameterDeclaration
(details.MessageArgs[index++], gen.TypeExpression(o.Type!)));
416
parameters.Add(gen.
ParameterDeclaration
(name, gen.TypeExpression(type)));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3619
=> this.
ParameterDeclaration
(identifier, type, initializer: null, RefKind.None);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (68)
CodeGeneration\SyntaxGeneratorTests.cs (68)
821
Generator.MethodDeclaration("m", parameters: [Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], returnType: Generator.IdentifierName("x")),
825
Generator.MethodDeclaration("m", parameters: [Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"), Generator.IdentifierName("a"))], returnType: Generator.IdentifierName("x")),
857
var parameters = parameterTypes.Select((t, i) => Generator.
ParameterDeclaration
("p" + i, Generator.TypeExpression(t))).ToList();
1020
Generator.ConstructorDeclaration("c", [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))]),
1025
parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))],
1086
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.ReadOnly),
1090
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.WriteOnly),
1094
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.Abstract),
1098
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.ReadOnly),
1102
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.WriteOnly),
1106
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.ReadOnly,
1111
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.WriteOnly,
1116
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x")),
1120
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"),
1125
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"),
1183
Generator.IndexerDeclaration(parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("a"))], type: Generator.IdentifierName("t"), accessibility: Accessibility.Internal, modifiers: DeclarationModifiers.Abstract),
1486
Generator.IndexerDeclaration(parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("a"))], type: Generator.IdentifierName("t"), accessibility: Accessibility.Protected, modifiers: DeclarationModifiers.Abstract),
1642
Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)]),
1646
Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)]),
1712
Generator.DelegateDeclaration("d", returnType: Generator.IdentifierName("t"), parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("pt"))]),
1876
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))], Generator.IdentifierName("x"), modifiers: DeclarationModifiers.Abstract),
1918
Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")),
2881
Assert.Equal(DeclarationKind.Parameter, Generator.GetDeclarationKind(Generator.
ParameterDeclaration
("p")));
2883
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t"))));
2904
Assert.Equal("p", Generator.GetName(Generator.
ParameterDeclaration
("p")));
2906
Assert.Equal("", Generator.GetName(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t"))));
2927
Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.
ParameterDeclaration
("x"), "p")));
2929
Assert.Equal("", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t")), "this")));
2950
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
ParameterDeclaration
("p")));
2952
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t"), accessibility: Accessibility.Internal)));
2974
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
ParameterDeclaration
("p"), Accessibility.Private)));
2976
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2998
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
ParameterDeclaration
("p")));
3000
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t"), modifiers: DeclarationModifiers.Abstract)));
3021
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
ParameterDeclaration
("p"), DeclarationModifiers.Abstract)));
3023
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t")), DeclarationModifiers.Abstract)));
3082
Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("i")], Generator.IdentifierName("t")), allModifiers)));
3199
Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("pt"))], Generator.IdentifierName("t"))).ToString());
3200
Assert.Equal("t", Generator.GetType(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))).ToString());
3220
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("pt"))], Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString());
3221
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString());
3237
Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3238
Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))])).Count);
3241
Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3242
Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))])).Count);
3244
Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))], Generator.IdentifierName("t"))).Count);
3245
Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))], Generator.IdentifierName("t"))).Count);
3254
Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters: [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3263
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3264
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3265
Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))], Generator.IdentifierName("t")), [Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2")), Generator.
ParameterDeclaration
("p3", Generator.IdentifierName("t3"))])).Count);
3270
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3272
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3273
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.StructDeclaration("c"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3274
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.InterfaceDeclaration("c"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3275
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.IdentifierName("x"), [Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))])).Count);
3283
Assert.Equal("x", Generator.GetExpression(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"), initializer: Generator.IdentifierName("x"))).ToString());
3317
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString());
3425
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))], Generator.IdentifierName("x"))),
3429
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))], Generator.IdentifierName("x")),
3435
Generator.IndexerDeclaration([Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))], Generator.IdentifierName("x")),
3588
var p = Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"));
3621
var p = Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"));
Microsoft.CodeAnalysis.Features (3)
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (2)
267
var parameter = _generator.
ParameterDeclaration
(parameterName, _generator.TypeExpression(parameterType));
528
var parameter = _generator.
ParameterDeclaration
(name: parameterName, type:
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (1)
29
parameters: [generator.
ParameterDeclaration
(
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
548
Return
ParameterDeclaration
(identifier, type)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (72)
CodeGeneration\SyntaxGeneratorTests.vb (72)
868
Generator.MethodDeclaration("m", parameters:={Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, returnType:=Generator.IdentifierName("x")),
873
Generator.MethodDeclaration("m", parameters:={Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"), Generator.IdentifierName("a"))}, returnType:=Generator.IdentifierName("x")),
1224
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x"))),
1228
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1238
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1250
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1254
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1258
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
1262
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly),
1269
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly),
1276
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly,
1285
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly,
1294
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.None),
1304
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1316
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1353
Dim params = {Generator.
ParameterDeclaration
("sender", Generator.TypeExpression(SpecialType.System_Object)), Generator.
ParameterDeclaration
("args", Generator.IdentifierName("EventArgs"))}
1382
Generator.ConstructorDeclaration("c", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}),
1388
parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))},
1565
Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)}),
1573
Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}),
1635
Generator.DelegateDeclaration("d", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}),
1643
Generator.DelegateDeclaration("d", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, returnType:=Generator.IdentifierName("t")),
1793
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Internal, DeclarationModifiers.Abstract),
1849
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Protected, DeclarationModifiers.Abstract),
2198
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
2205
Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x")),
2226
Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")),
2574
Assert.Equal(DeclarationKind.Parameter, Generator.GetDeclarationKind(Generator.
ParameterDeclaration
("p")))
2577
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"))))
2578
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2599
Assert.Equal("p", Generator.GetName(Generator.
ParameterDeclaration
("p")))
2602
Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"))))
2603
Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2624
Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.
ParameterDeclaration
("x"), "p")))
2627
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t")), "X")))
2628
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "X")))
2648
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
ParameterDeclaration
("p")))
2650
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2676
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
ParameterDeclaration
("p"), Accessibility.Private)))
2678
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2703
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
ParameterDeclaration
("p")))
2705
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2725
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
ParameterDeclaration
("p"), DeclarationModifiers.Abstract)))
2727
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("i")}, Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2769
Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("t"))).ToString())
2770
Assert.Equal("t", Generator.GetType(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))).ToString())
2790
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2791
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2837
Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2838
Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))})).Count)
2841
Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2842
Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))})).Count)
2846
Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t"))).Count)
2847
Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2"))}, Generator.IdentifierName("t"))).Count)
2856
Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters:={Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2864
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2865
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2866
Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration({Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t")), {Generator.
ParameterDeclaration
("p2", Generator.IdentifierName("t2")), Generator.
ParameterDeclaration
("p3", Generator.IdentifierName("t3"))})).Count)
2871
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2873
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2874
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.IdentifierName("x"), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2875
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), {Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))})).Count)
2882
Assert.Equal("x", Generator.GetExpression(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"), initializer:=Generator.IdentifierName("x"))).ToString())
2900
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString())
3102
Dim p = Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))
3127
Dim p = Generator.
ParameterDeclaration
("p", Generator.IdentifierName("t"))
Microsoft.Interop.LibraryImportGenerator (17)
Analyzers\ConvertToLibraryImportFixer.cs (1)
245
editor.Generator.
ParameterDeclaration
("@return", editor.Generator.GetType(generatedDeclaration), refKind: RefKind.Out)
Analyzers\CustomMarshallerAttributeFixer.cs (16)
224
parameters: new[] { gen.
ParameterDeclaration
("managed", gen.TypeExpression(managedType)) },
236
parameters: new[] { gen.
ParameterDeclaration
("unmanaged", unmanagedTypeSyntax.Value) },
261
gen.
ParameterDeclaration
("managed", gen.TypeExpression(managedType)),
262
gen.
ParameterDeclaration
("numElements", type: gen.TypeExpression(SpecialType.System_Int32), refKind: RefKind.Out),
277
gen.
ParameterDeclaration
("unmanaged", unmanagedTypeSyntax.Value),
278
gen.
ParameterDeclaration
("numElements", type: gen.TypeExpression(SpecialType.System_Int32)),
293
gen.
ParameterDeclaration
("managed", gen.TypeExpression(managedType))
308
gen.
ParameterDeclaration
("unmanaged", unmanagedTypeSyntax.Value),
309
gen.
ParameterDeclaration
("numElements", gen.TypeExpression(SpecialType.System_Int32))
324
gen.
ParameterDeclaration
("unmanaged", unmanagedTypeSyntax.Value),
325
gen.
ParameterDeclaration
("numElements", gen.TypeExpression(SpecialType.System_Int32))
340
gen.
ParameterDeclaration
("managed", gen.TypeExpression(managedType))
420
parameters: new[] { gen.
ParameterDeclaration
("managed", gen.TypeExpression(managedType)) },
440
parameters: new[] { gen.
ParameterDeclaration
("unmanaged", unmanagedTypeSyntax.Value) },
493
gen.
ParameterDeclaration
("numElements", gen.TypeExpression(SpecialType.System_Int32))
507
gen.
ParameterDeclaration
("numElements", gen.TypeExpression(SpecialType.System_Int32))