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