5 implementations of Construct
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
58public INamedTypeSymbol Construct(params ITypeSymbol[] typeArguments)
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
131INamedTypeSymbol INamedTypeSymbol.Construct(params ITypeSymbol[] typeArguments)
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
91public INamedTypeSymbol Construct(params ITypeSymbol[] typeArguments)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1405Private Function INamedTypeSymbol_Construct(ParamArray typeArguments() As ITypeSymbol) As INamedTypeSymbol Implements INamedTypeSymbol.Construct
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
58public INamedTypeSymbol Construct(params ITypeSymbol[] typeArguments)
112 references to Construct
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (1)
88ActionOfBinderOptions = binderOptions is null ? null : compilation.GetBestTypeByMetadataName(typeof(Action<>))?.Construct(binderOptions);
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentSymbols.cs (1)
48var parameterCaptureUnmatchedValuesRuntimeType = dictionary.Construct(@string, @object);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentSymbols.cs (1)
48var parameterCaptureUnmatchedValuesRuntimeType = dictionary.Construct(@string, @object);
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
648typeSymbol = typeSymbol.Construct(typeArguments.Select(t => t.Type).ToArray());
DocumentationCommentId.cs (1)
1052results[i] = ((INamedTypeSymbol)results[i]).Construct(typeArgs);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
648typeSymbol = typeSymbol.Construct(typeArguments.Select(t => t.Type).ToArray());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
666=> typeArguments.Length > 0 ? type.Construct(typeArguments) : type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
50return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CompilationTypeGenerator.cs (1)
20=> namedType.Construct(typeArguments);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
48return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
52return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
199var currentType = typeArguments.Length > 0 ? type.Construct(typeArguments) : type;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
393var constructed = iequatableType.Construct(memberType);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
115fixedDeclaration = taskType.Construct(returnedType).GenerateTypeSyntax(allowVar: false);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (2)
131ienumerableGenericSymbol = ienumerableGenericSymbol.Construct(typeArgument); 132ienumeratorGenericSymbol = ienumeratorGenericSymbol.Construct(typeArgument);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1134return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
6211var vt2 = comp.CreateErrorTypeSymbol(null, "ValueTuple", 2).Construct(intType, intType); 6255vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType); 6258vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.Assembly.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType); 6261vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.SourceModule.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_Synthesized.cs (1)
648var c1OfInt = comp.GetTypeByMetadataName("C1`1").Construct(comp.GetSpecialType(SpecialType.System_Int32));
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
115fixedDeclaration = taskType.Construct(returnedType).GenerateTypeSyntax(allowVar: false);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (2)
131ienumerableGenericSymbol = ienumerableGenericSymbol.Construct(typeArgument); 132ienumeratorGenericSymbol = ienumeratorGenericSymbol.Construct(typeArgument);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullableConversionTests.cs (1)
812var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_Int32));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (22)
Compilation\GetSemanticInfoTests.cs (10)
5408Assert.Throws<InvalidOperationException>(() => type.Construct(objectType)); // non-generic type 5414Assert.Throws<InvalidOperationException>(() => type.Construct(objectType)); // non-generic type 5420Assert.Throws<ArgumentException>(() => type.Construct(new ITypeSymbol[] { null })); // null type arg 5421Assert.Throws<ArgumentException>(() => type.Construct()); // typeArgs.Length != Arity 5422Assert.Throws<InvalidOperationException>(() => type.Construct(objectType).Construct(objectType)); // constructed type 5428Assert.Throws<ArgumentException>(() => type.Construct(new ITypeSymbol[] { null })); // null type arg 5429Assert.Throws<ArgumentException>(() => type.Construct()); // typeArgs.Length != Arity 5430Assert.Throws<InvalidOperationException>(() => type.Construct(objectType).Construct(objectType)); // constructed type
Compilation\SemanticModelAPITests.cs (2)
3923var type1 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 3930var type2 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32));
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
1824type = type.Construct(compilation.GetSpecialType(SpecialType.System_String));
Symbols\AnonymousTypesSemanticsTests.cs (1)
1980Assert.Throws<InvalidOperationException>(() => namedType.Construct(args));
Symbols\CustomModifiersTests.cs (2)
82nullable = nullable.Construct(i); 155dictionary = dictionary.Construct(i, i);
Symbols\OverriddenOrHiddenMembersTests.cs (2)
3690var validatorBaseObject = validatorBaseT.Construct(compilation.ObjectType); 3946var validatorBaseObject = validatorBaseT.Construct(compilation.ObjectType);
Symbols\Source\TypeMapTests.cs (2)
141var c1OfByteChar = C1.Construct(_byte, _char); 184var c1OfByteChar = C1.Construct(_byte, _char);
Symbols\TypedConstantTests.cs (2)
37_enumString1 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String)); 38_enumString2 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (1)
148? compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(container)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1134return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
407var listOfIntType = listType.Construct(intType);
Microsoft.CodeAnalysis.Features (3)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
144constructedType = equatableTypeOpt.Construct(containingType);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
92=> _symbol.Construct(typeArguments);
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
648typeSymbol = typeSymbol.Construct(typeArguments.Select(t => t.Type).ToArray());
Microsoft.CodeAnalysis.UnitTests (2)
CommonTypedConstantTests.cs (2)
32_enumString1 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String)); 33_enumString2 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String));
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1405Private Function INamedTypeSymbol_Construct(ParamArray typeArguments() As ITypeSymbol) As INamedTypeSymbol Implements INamedTypeSymbol.Construct
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (19)
Compilation\CompilationAPITests.vb (2)
1818Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType) 1861Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType)
Semantics\Conversions.vb (17)
750Dim nullableType2 = nullableType.Construct(numericType) 1316Dim nullableType2 = nullableType.Construct(numericType) 1501Dim enumerableOfArrayInt32 = enumerable.Construct(arrayInt32) 2061nullable.Construct(c1.GetSpecialType(System_Byte)), 2062nullable.Construct(c1.GetSpecialType(System_SByte)), 2063nullable.Construct(c1.GetSpecialType(System_UInt16)), 2064nullable.Construct(c1.GetSpecialType(System_Int16)), 2065nullable.Construct(c1.GetSpecialType(System_UInt32)), 2066nullable.Construct(c1.GetSpecialType(System_Int32)), 2067nullable.Construct(c1.GetSpecialType(System_UInt64)), 2068nullable.Construct(c1.GetSpecialType(System_Int64)), 2069nullable.Construct(c1.GetSpecialType(System_Decimal)), 2070nullable.Construct(c1.GetSpecialType(System_Single)), 2071nullable.Construct(c1.GetSpecialType(System_Double)), 2072nullable.Construct(c1.GetSpecialType(System_Char)), 2073nullable.Construct(c1.GetSpecialType(System_Boolean)), 2074nullable.Construct(c1.GetSpecialType(System_DateTime))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\CustomModifiersTests.vb (1)
78nullable = nullable.Construct(i)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
101RewriteFunctionAsClause(taskOfT.Construct(returnType), asClauseOpt, semanticModel, position) 139RewriteFunctionAsClause(iEnumerableOfT.Construct(returnType), asClauseOpt, semanticModel, position)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.vb (2)
24Me._ienumerableInt = _emptyCompilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_emptyCompilation.GetSpecialType(SpecialType.System_Int32)) 370Dim listOfIntType = listType.Construct(intType)
Microsoft.CodeAnalysis.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
666=> typeArguments.Length > 0 ? type.Construct(typeArguments) : type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
50return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CompilationTypeGenerator.cs (1)
20=> namedType.Construct(typeArguments);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
48return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
52return symbol.ConstructedFrom.Construct([.. arguments]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
199var currentType = typeArguments.Length > 0 ? type.Construct(typeArguments) : type;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
82: generatorInternal.Type(equalityComparerType.Construct(type), typeContext: false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
393var constructed = iequatableType.Construct(memberType);
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
SymbolKeyTests.cs (5)
741var constructed = type.Construct(compilation.GetSpecialType(SpecialType.System_Int32), type.TypeParameters[1]); 761var constructed = outer.Construct(compilation.GetSpecialType(SpecialType.System_String)); 791var a_string = a.Construct(compilation.GetSpecialType(SpecialType.System_String)); 798var a_string_b_int = a_string_b.Construct(compilation.GetSpecialType(SpecialType.System_Int32)); 806var a_b_int = a_b.Construct(compilation.GetSpecialType(SpecialType.System_Int32));
UtilityTest\DocumentationCommentIdTests.cs (1)
339var ienumTP = ienum.Construct(outerType.TypeArguments[0]);
Microsoft.Interop.LibraryImportGenerator (9)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
969diagnosticReporter.CreateAndReportDiagnostic(ReturnTypeMustBeExpectedTypeRule, unmanagedValuesCollectionMethod.ToDisplayString(), expectedSpanType.Construct(expectedElementType).ToDisplayString());
Analyzers\CustomMarshallerAttributeFixer.cs (8)
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])), 342returnType: gen.TypeExpression(spanOfT.Construct(managedElementTypeSymbol.Value)), 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)),
Microsoft.Interop.SourceGeneration (3)
ArrayMarshallingInfoProvider.cs (1)
68arrayMarshaller = arrayMarshaller.Construct(
ComInterfaceMarshallingInfoProvider.cs (1)
39comInterfaceMarshaller = comInterfaceMarshaller.Construct(interfaceType);
CustomMarshallingInfoHelper.cs (1)
54entryPointType = entryPointType.ConstructedFrom.Construct(
System.Text.Json.SourceGeneration (5)
Helpers\KnownTypeSymbols.cs (2)
159: (_MemoryByteType = new(MemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value; 165: (_ReadOnlyMemoryByteType = new(ReadOnlyMemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value;
Helpers\RoslynExtensions.cs (1)
96type = namedType.ConstructedFrom.Construct(erasedTypeArgs);
JsonSourceGenerator.Parser.cs (2)
559INamedTypeSymbol converterSymbol = _knownSymbols.JsonStringEnumConverterOfTType.Construct(type); 906INamedTypeSymbol? dictionary = _knownSymbols.DictionaryOfTKeyTValueType?.Construct(keyType, valueType);