103 references to TypeExpression
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (1)
75 generator.TypeExpression (attributeSymbol), attributeArguments)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
137 generator.TypeExpression (attributeSymbol), attributeArguments)
Microsoft.Analyzers.Extra (6)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (6)
367var loggerType = gen.TypeExpression(t); 370loggerType = gen.TypeExpression(t.WithNullableAnnotation(NullableAnnotation.Annotated)); 386parameters.Add(gen.ParameterDeclaration("exception", gen.TypeExpression(invocationOp.Arguments[details.ExceptionParamIndex].Value.Type!))); 394parameters.Add(gen.ParameterDeclaration(details.MessageArgs[index++], gen.TypeExpression(o.Type!))); 416parameters.Add(gen.ParameterDeclaration(name, gen.TypeExpression(type))); 595gen.MemberAccessExpression(gen.TypeExpression(comp.GetTypeByMetadataName("Microsoft.Extensions.Logging.LogLevel")!), details.Level),
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
90generator.Attribute(editor.Generator.TypeExpression(obsoleteAttribute)));
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
212g.TypeExpression(gcType),
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
87generator.TypeExpression(symbol.Type),
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
181let caseLabel = (TMemberAccessExpression)generator.MemberAccessExpression(generator.TypeExpression(enumType), e.Name).WithAdditionalAnnotations(Simplifier.Annotation)
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
254var typeExpression = generator.TypeExpression(typeSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
146generator.TypeExpression(enumType),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
49factory.MemberAccessExpression(factory.TypeExpression(hashCodeType), "Combine"),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
116var memberAccess = generator.MemberAccessExpression(generator.TypeExpression(type), memberName);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
116var memberAccess = generator.MemberAccessExpression(generator.TypeExpression(type), memberName);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
316VerifySyntax<QualifiedNameSyntax>(Generator.TypeExpression(genericType), "global::System.Collections.Generic.IEnumerable<T>"); 319VerifySyntax<ArrayTypeSyntax>(Generator.TypeExpression(arrayType), "global::System.Int32[]"); 857var parameters = parameterTypes.Select((t, i) => Generator.ParameterDeclaration("p" + i, Generator.TypeExpression(t))).ToList(); 4978Generator.TypeExpression(type),
Microsoft.CodeAnalysis.Features (18)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
151.Attribute(generator.TypeExpression(debuggerAttributeTypeSymbol), [attributeArgument])
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
246var typeReference = syntaxGenerator.TypeExpression(newType);
ExtractInterface\AbstractExtractInterfaceService.cs (1)
339var typeReference = syntaxGenerator.TypeExpression(extractedInterfaceSymbol);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
397generator.TypeExpression(stringType), 549return generator.TypeExpression(typeSymbol);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (2)
267var parameter = _generator.ParameterDeclaration(parameterName, _generator.TypeExpression(parameterType)); 529_generator.TypeExpression(parameterType));
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (3)
295expandedExtensionInvocation = expandedExtensionInvocation.ReplaceNode(typeExpression, generator.TypeExpression(newType) 319replacement = generator.TypeExpression(newType); 335generator.TypeExpression(newType)
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (1)
62: generator.TypeExpression(typeSymbol);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (3)
47generator.TypeExpression(propertyBackingField.ContainingType), 313parameterType = Generator.TypeExpression(_property.Type); 325? Generator.TypeExpression(_property.ContainingType)
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
90generator.Attribute(editor.Generator.TypeExpression(obsoleteAttribute)));
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
87generator.TypeExpression(symbol.Type),
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
181let caseLabel = (TMemberAccessExpression)generator.MemberAccessExpression(generator.TypeExpression(enumType), e.Name).WithAdditionalAnnotations(Simplifier.Annotation)
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
254var typeExpression = generator.TypeExpression(typeSymbol);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (3)
CodeGeneration\SyntaxGeneratorTests.vb (3)
291VerifySyntax(Of QualifiedNameSyntax)(Generator.TypeExpression(genericType), "Global.System.Collections.Generic.IEnumerable(Of T)") 294VerifySyntax(Of ArrayTypeSyntax)(Generator.TypeExpression(arrayType), "System.Int32()") 1831Generator.TypeExpression(Me._ienumerableInt)),
Microsoft.CodeAnalysis.Workspaces (26)
Editing\SymbolEditorExtensions.cs (1)
99return editor.SetBaseTypeAsync(symbol, g => newBaseType != null ? g.TypeExpression(newBaseType) : null, cancellationToken);
Editing\SyntaxGenerator.cs (23)
146TypeExpression(field.Type), 325TypeExpression(symbol.Type), 495TypeExpression(symbol.Type), 533TypeExpression(symbol.Type), 767baseType: type.BaseType != null ? TypeExpression(type.BaseType) : null, 768interfaceTypes: type.Interfaces.Select(TypeExpression), 776interfaceTypes: type.Interfaces.Select(TypeExpression), 782interfaceTypes: type.Interfaces.Select(TypeExpression), 796returnType: invoke.ReturnsVoid ? null : TypeExpression(invoke.ReturnType), 876types: tp.ConstraintTypes.Select(TypeExpression)); 1030name: this.TypeExpression(attribute.AttributeClass), 1603/// <see langword="true"/> if the language requires a <see cref="TypeExpression(ITypeSymbol)"/> 1629=> LocalDeclarationStatement(TypeExpression(type), name, initializer, isConst); 1742=> CatchClause(TypeExpression(type), identifier, statements); 1849=> GenericName(identifier, typeArguments.Select(TypeExpression)); 1942var expression = TypeExpression(typeSymbol); 2022=> TupleElementExpression(TypeExpression(type), name); 2206=> ObjectCreationExpression(TypeExpression(type), arguments); 2273=> IsTypeExpression(expression, TypeExpression(type)); 2284=> TryCastExpression(expression, TypeExpression(type)); 2295=> CastExpression(TypeExpression(type), expression); 2306=> ConvertExpression(TypeExpression(type), expression); 2385=> LambdaParameter(identifier, TypeExpression(type));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
146generator.TypeExpression(enumType),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
49factory.MemberAccessExpression(factory.TypeExpression(hashCodeType), "Combine"),
Microsoft.Interop.ComInterfaceGenerator (3)
Analyzers\AddGeneratedComClassFixer.cs (1)
28var attribute = gen.Attribute(gen.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.GeneratedComClassAttribute)).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation));
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (2)
78var generatedComInterfaceAttribute = gen.Attribute(gen.TypeExpression(comp.GetTypeByMetadataName(TypeNames.GeneratedComInterfaceAttribute)).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation)); 87gen.AttributeArgument("StringMarshallingCustomType", gen.TypeOfExpression(gen.TypeExpression(comp.GetTypeByMetadataName(TypeNames.BStrStringMarshaller))))
Microsoft.Interop.LibraryImportGenerator (30)
Analyzers\ConvertToLibraryImportFixer.cs (7)
251editor.Generator.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32))); 428generator.TypeExpression(libraryImportAttrType)); 460generator.TypeExpression(stringMarshallingType), 469generator.TypeExpression(stringMarshallingType), 473generator.TypeOfExpression(generator.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.AnsiStringMarshaller))))); 613ExpressionSyntax typeOfExpression = (ExpressionSyntax)generator.TypeOfExpression(generator.TypeExpression(callingConventionType)); 620generator.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(TypeNames.System_Type)),
Analyzers\CustomMarshallerAttributeFixer.cs (23)
224parameters: new[] { gen.ParameterDeclaration("managed", gen.TypeExpression(managedType)) }, 237returnType: gen.TypeExpression(managedType), 248gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 261gen.ParameterDeclaration("managed", gen.TypeExpression(managedType)), 280returnType: gen.TypeExpression(managedType), 293gen.ParameterDeclaration("managed", gen.TypeExpression(managedType)) 295returnType: gen.TypeExpression(readOnlySpanOfT.Construct(managedElementTypeSymbol.Value)), 311returnType: gen.TypeExpression(spanOfT.Construct(typeParameters[typeParameters.Length - 1])), 327returnType: gen.TypeExpression(readOnlySpanOfT.Construct(typeParameters[typeParameters.Length - 1])), 340gen.ParameterDeclaration("managed", gen.TypeExpression(managedType)) 342returnType: gen.TypeExpression(spanOfT.Construct(managedElementTypeSymbol.Value)), 380return gen.TypeExpression(unmanagedType); 382return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 420parameters: new[] { gen.ParameterDeclaration("managed", gen.TypeExpression(managedType)) }, 450returnType: gen.TypeExpression(managedType), 460gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 471returnType: gen.TypeExpression(readOnlySpanOfT.Construct(managedElementTypeSymbol.Value)), 481returnType: gen.TypeExpression(spanOfT.Construct(typeParameters[typeParameters.Length - 1])), 495returnType: gen.TypeExpression(readOnlySpanOfT.Construct(typeParameters[typeParameters.Length - 1])), 509returnType: gen.TypeExpression(spanOfT.Construct(managedElementTypeSymbol.Value)), 547return gen.TypeExpression(unmanagedType); 549return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 570generator.TypeExpression(
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexCodeFixer.cs (2)
185returnType: generator.TypeExpression(regexSymbol), 223SyntaxNode attributes = generator.Attribute(generator.TypeExpression(generatedRegexAttributeSymbol), attributeArguments: (patternValue, regexOptionsValue, cultureNameValue) switch