43 references to WithType
Microsoft.AspNetCore.App.CodeFixes (2)
DetectMismatchedParameterOptionalityFixer.cs (1)
48var newParam = parameterSyntax.WithType(SyntaxFactory.NullableType(parameterType));
RouteParameterUnusedParameterFixer.cs (1)
89var newParameter = SyntaxFactory.Parameter(SyntaxFactory.Identifier(routeParameterName!)).WithType(type);
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Syntax.Generated.cs (1)
13835internal override BaseParameterSyntax WithTypeCore(TypeSyntax? type) => WithType(type);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
106parameter.WithType(null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
186parameterList, parameterList.WithParameters(parameters.Insert(0, Parameter(Identifier("@this")).WithType(thisParameter.Type.GenerateTypeSyntax()))));
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
258parameterNode = parameterNode.WithType(delegateParameter?.Type.GenerateTypeSyntax() ?? s_objectType);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
854return Cast<TDeclarationNode>(parameterSyntax.WithType(newTypeSyntax));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
70.WithType(parameter.Type.GenerateTypeSyntax(allowVar: false))
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
303.WithType(parameter.Type.GenerateTypeSyntax());
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
106parameter.WithType(null)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
186parameterList, parameterList.WithParameters(parameters.Insert(0, Parameter(Identifier("@this")).WithType(thisParameter.Type.GenerateTypeSyntax()))));
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
258parameterNode = parameterNode.WithType(delegateParameter?.Type.GenerateTypeSyntax() ?? s_objectType);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Generated\Syntax.Test.xml.Generated.cs (1)
13651var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithType(node.Type).WithIdentifier(node.Identifier).WithDefault(node.Default);
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2169SyntaxKind.Parameter => ((ParameterSyntax)declaration).WithType((TypeSyntax)type),
Simplification\CSharpSimplificationService.Expander.cs (2)
188var newParameter = parameters[i].WithType(typeSyntax).WithAdditionalAnnotations(Simplifier.Annotation); 227var newSimpleLambdaParameter = simpleLambda.Parameter.WithType(typeSyntax).WithoutTrailingTrivia();
Simplification\Reducers\CSharpMiscellaneousReducer.cs (3)
46var newParameterSyntax = parameterSyntax.WithType(null).WithAdditionalAnnotations(annotation); 75var newParameterSyntax = node.WithType(null); 97var newParameterSyntax = parameter.WithType(null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
854return Cast<TDeclarationNode>(parameterSyntax.WithType(newTypeSyntax));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
70.WithType(parameter.Type.GenerateTypeSyntax(allowVar: false))
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.cs (5)
1355.WithType( 1360.WithType( 1405.WithType( 1490.WithType( 1516.WithType(
Microsoft.Interop.ComInterfaceGenerator (2)
ComClassGenerator.cs (1)
195.WithType(PredefinedType(Token(SyntaxKind.IntKeyword)))
VtableIndexStubGenerator.cs (1)
446.WithType(PointerType(PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword))))));
Microsoft.Interop.JavaScript.JSImportGenerator (9)
JSExportGenerator.cs (1)
149Parameter(Identifier(Constants.ArgumentsBuffer)).WithType(PointerType(ParseTypeName(Constants.JSMarshalerArgumentGlobal))))))
Marshaling\FuncJSGenerator.cs (4)
98.WithType(IdentifierName(Constants.JSMarshalerArgumentGlobal)), 100.WithType(sourceType)}))) 113.WithType(IdentifierName(Constants.JSMarshalerArgumentGlobal)), 116.WithType(sourceType)})))
Marshaling\TaskJSGenerator.cs (4)
79.WithType(IdentifierName(Constants.JSMarshalerArgumentGlobal)), 82.WithType(sourceType)}))) 102.WithType(IdentifierName(Constants.JSMarshalerArgumentGlobal)), 104.WithType(sourceType)})))
Microsoft.Interop.SourceGeneration (3)
Marshalling\MarshallingGeneratorExtensions.cs (2)
96.WithType(behavior switch 108.WithType(info.ManagedType.Syntax);
SignatureContext.cs (1)
46.WithType(typeInfo.ManagedType.Syntax)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
1808=> SyntaxFactory.Parameter(SyntaxFactory.Identifier(name)).WithType(SyntaxFactory.ParseTypeName(type));
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
854return Cast<TDeclarationNode>(parameterSyntax.WithType(newTypeSyntax));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ParameterGenerator.cs (1)
70.WithType(parameter.Type.GenerateTypeSyntax(allowVar: false))