Base:
property
Type
Microsoft.CodeAnalysis.CSharp.Syntax.BaseParameterSyntax.Type
79 references to Type
Microsoft.AspNetCore.App.CodeFixes (1)
DetectMismatchedParameterOptionalityFixer.cs (1)
46if (param is ParameterSyntax { Type: { } parameterType } parameterSyntax)
Microsoft.CodeAnalysis.CSharp (25)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2113=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.Type), VisitToken(node.Identifier), (EqualsValueClauseSyntax?)Visit(node.Default));
_generated\2\Syntax.xml.Syntax.Generated.cs (5)
13871if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || type != this.Type || identifier != this.Identifier || @default != this.Default) 13882public new ParameterSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Type, this.Identifier, this.Default); 13884public new ParameterSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.Identifier, this.Default); 13887public ParameterSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.Type, identifier, this.Default); 13888public ParameterSyntax WithDefault(EqualsValueClauseSyntax? @default) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, @default);
Binder\Binder_Lambda.cs (6)
126var hasExplicitlyTypedParameterList = parameterSyntaxList.All(static p => p.Type != null); 180var typeOpt = p.Type is not null ? BindType(p.Type, diagnostics) : default; 330var requiresTypes = parameterSyntaxList.Any(static p => p.Type != null); 340if (parameter.Type is null) 356if (parameter.Modifiers.Count > 0 && parameter.Type is null)
Binder\LocalScopeBinder.cs (1)
232parameter.Type?.VisitRankSpecifiers((rankSpecifier, args) =>
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (1)
51=> CreateSpan(parameter.Modifiers, parameter.Type, parameter.Identifier);
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
92SyntaxNode? parameterTypeSyntax = parameterList.Parameters[0].Type;
Symbols\Source\ParameterHelpers.cs (1)
740if (parameter is ParameterSyntax { Type: null, Identifier.Text: var parameterIdentifier })
Symbols\Source\SourceMemberContainerSymbol.cs (2)
4872Debug.Assert(parameterSyntax.Type != null); 4873typesBuilder.Add(parameterSyntax.Type);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
217Debug.Assert(parameterSyntax.Type != null); 218var loc = parameterSyntax.Type.Location;
Symbols\Source\SourceParameterSymbol.cs (1)
47var location = new SourceLocation(name == "" ? syntax.Type : identifier);
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
56=> ((ParameterSyntax)CSharpSyntaxNode).Type!.Location;
Symbols\VarianceSafety.cs (1)
251return (syntax == null) ? null : syntax.Type.Location;
Syntax\ParameterSyntax.cs (2)
13return this.Type == null && this.Identifier.ContextualKind() == SyntaxKind.ArgListKeyword; 19if (Type is null && Identifier.IsKind(SyntaxKind.None))
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
72explicitLambda.ParameterList.Parameters.Any(p => p.Type is null || p.Default != null)) 107.WithIdentifier(parameter.Identifier.WithPrependedLeadingTrivia(parameter.Type!.GetLeadingTrivia()))));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (1)
76return parameter.Type;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
894builder.Append(string.Join(", ", parameterList.Parameters.Select(p => ConvertToSingleLine(p.Type))));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
307return parameterSyntax.Type;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
257if (parameterNode.Type == null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (3)
847if (parameterSyntax.Type != null) 850.WithLeadingTrivia(parameterSyntax.Type.GetLeadingTrivia()) 851.WithTrailingTrivia(parameterSyntax.Type.GetTrailingTrivia());
Microsoft.CodeAnalysis.CSharp.Features (16)
ChangeSignature\CSharpChangeSignatureService.cs (1)
391var doNotSkipParameterType = parenLambda.ParameterList.Parameters.FirstOrDefault()?.Type != null;
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
515p => p.Type, 535p => p.Type,
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
304if (parameterSyntax is not { Type: { } parameterType, Parent.Parent: BaseMethodDeclarationSyntax baseMethod })
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
96if (method.ParameterList.Parameters is [{ Type: ArrayTypeSyntax arrayType }])
EditAndContinue\BreakpointSpans.cs (3)
529=> CreateSpan(parameter.Modifiers, parameter.Type, parameter.Identifier); 536if (parameter.Type != null) 538foreach (var token in getDescendantTokens(parameter.Type))
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1744var startNode = parameter.Type ?? (SyntaxNode)parameter;
InlineHints\CSharpInlineTypeHintsService.cs (1)
73if (node is ParameterSyntax { Type: null } parameterNode)
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (2)
354static (parameter, nameBuilder) => AppendType(parameter.Type, nameBuilder)); 440static (parameter, builder) => AppendType(parameter.Type, builder));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
72explicitLambda.ParameterList.Parameters.Any(p => p.Type is null || p.Default != null)) 107.WithIdentifier(parameter.Identifier.WithPrependedLeadingTrivia(parameter.Type!.GetLeadingTrivia()))));
src\roslyn\src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
307return parameterSyntax.Type;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
257if (parameterNode.Type == null)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Runtime\CSharpDetectPreviewFeatureAnalyzer.cs (1)
92TypeSyntax parameterType = parameter.Type!;
Microsoft.NetCore.Analyzers\Runtime\CSharpPreventNumericIntPtrUIntPtrBehavioralChanges.cs (1)
89ParameterSyntax parameter => parameter.Type,
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
2126return ((ParameterSyntax)declaration).Type; 3660=> node is ParameterSyntax { Type: null, Default: null, Modifiers.Count: 0 };
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (4)
570if (parameter.Type != null) 572builder.Append(parameter.Type.ConvertToSingleLine().ToString()); 639TryGetSimpleTypeName(methodDeclaration.ParameterList.Parameters[0].Type, typeParameterNames, out var targetTypeName, out var isArray); 645if (node is not ExtensionBlockDeclarationSyntax { ParameterList.Parameters: [{ Type: var parameterType }, ..] } extensionBlockDeclaration)
Recommendations\CSharpRecommendationServiceRunner.cs (2)
59if (parameter.Type != null) 61explicitLambdaParameterType = _context.SemanticModel.GetTypeInfo(parameter.Type, _cancellationToken).Type;
Simplification\CSharpSimplificationService.Expander.cs (1)
175if (parameters.Length > 0 && parameters.Any(p => p.Type == null))
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
43if (parameterSyntax.Type != null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (1)
76return parameter.Type;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
894builder.Append(string.Join(", ", parameterList.Parameters.Select(p => ConvertToSingleLine(p.Type))));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (3)
847if (parameterSyntax.Type != null) 850.WithLeadingTrivia(parameterSyntax.Type.GetLeadingTrivia()) 851.WithTrailingTrivia(parameterSyntax.Type.GetTrailingTrivia());
Microsoft.Interop.ComInterfaceGenerator (2)
VirtualMethodPointerStubGenerator.cs (2)
104functionPointerParameters.AddRange(paramList.Parameters.Select(p => FunctionPointerParameter(attributeLists: default, p.Modifiers, p.Type))); 247functionPointerParameters.AddRange(paramList.Parameters.Select(p => FunctionPointerParameter(p.Type)));
Microsoft.Interop.SourceGeneration (1)
Marshalling\MarshallingGeneratorExtensions.cs (1)
149ValueBoundaryBehavior.CastNativeIdentifier => Argument(CastExpression(generator.AsParameter(context).Type, IdentifierName(nativeIdentifier))),
Microsoft.ML.InternalCodeAnalyzer (3)
ContractsCheckAnalyzer.cs (1)
176if (param.Type.ToString() == "ModelLoadContext")
ContractsCheckNameofFixProvider.cs (2)
125string paramTypeString = param.Type.ToString(); 134var type = semanticModel.GetTypeInfo(argParam.Type, context.CancellationToken).Type;
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (1)
76return parameter.Type;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
894builder.Append(string.Join(", ", parameterList.Parameters.Select(p => ConvertToSingleLine(p.Type))));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (3)
847if (parameterSyntax.Type != null) 850.WithLeadingTrivia(parameterSyntax.Type.GetLeadingTrivia()) 851.WithTrailingTrivia(parameterSyntax.Type.GetTrailingTrivia());