90 references to TypeArguments
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (22)
CodeGen\CodeGenTupleTest.cs (20)
492Assert.Equal(1, iface.TypeArguments().Length); 493TypeSymbol typeArg = iface.TypeArguments()[0]; 507Assert.Equal(1, iface.TypeArguments().Length); 508typeArg = iface.TypeArguments()[0]; 519Assert.Equal(1, iface.TypeArguments().Length); 520typeArg = iface.TypeArguments()[0]; 531Assert.Equal(1, iface.TypeArguments().Length); 532typeArg = iface.TypeArguments()[0]; 694Assert.Equal(1, constraint.TypeArguments().Length); 695TypeSymbol typeArg = constraint.TypeArguments()[0]; 710Assert.Equal(1, constraint.TypeArguments().Length); 711typeArg = constraint.TypeArguments()[0]; 1005var first = field2Type.TypeArguments()[0]; 26789var tuple = iEnumerable.TypeArguments()[0]; 26862var tuple = iEnumerable.TypeArguments()[0]; 26925var container = (NamedTypeSymbol)iEnumerable.TypeArguments()[0]; 26928var tuple = (NamedTypeSymbol)container.TypeArguments()[0]; 26993var contained = (NamedTypeSymbol)iEnumerable.TypeArguments()[0]; 27000var tuple1 = (NamedTypeSymbol)contained.TypeArguments()[0]; 27016var tuple2 = (NamedTypeSymbol)container.TypeArguments()[0];
Emit\EmitMetadataTests.cs (2)
786Assert.Same(baseType.TypeArguments()[0], derivedType.TypeParameters[0]); 787Assert.Same(baseType.TypeArguments()[1], derivedType.TypeParameters[1]);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Attributes\AttributeTests_Tuples.cs (3)
488var firstTuple = field6Type.TypeArguments().Single(); 940var typeArg = constraint.TypeArguments().Single(); 1040var typeArg = interfaceImpl.TypeArguments().Single();
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (15)
DynamicTests.cs (3)
139Assert.Equal(TypeKind.Dynamic, ((NamedTypeSymbol)method.ReturnType).TypeArguments().Single().TypeKind); 265Assert.Equal(TypeKind.Dynamic, ((NamedTypeSymbol)method.ReturnType).TypeArguments().Single().TypeKind); 734Assert.Equal(TypeKind.Dynamic, ((NamedTypeSymbol)method.ReturnType).TypeArguments().Single().TypeKind);
ExpressionCompilerTestBase.cs (1)
435AssertEx.All(type.TypeArguments(), typeArgument => type.IsContainingSymbolOfAllTypeParameters(typeArgument));
ExpressionCompilerTests.cs (2)
2089Assert.Equal(returnType.TypeArguments()[0].ContainingSymbol, containingType.ContainingType); 2096var typeArg = localType.TypeArguments()[0];
LocalsTests.cs (9)
1768Assert.Equal(containingType.TypeParameters[1], returnType.TypeArguments()[0]); 1769Assert.Equal(containingType.TypeParameters[2], returnType.TypeArguments()[1]); 1771Assert.Equal(containingType.TypeParameters[0], returnType.TypeArguments()[0]); 1786Assert.Equal(containingType.TypeParameters[2], returnType.TypeArguments()[0]); 1788Assert.Equal(containingType.TypeParameters[1], returnType.TypeArguments()[0]); 1846Assert.Equal(containingType.TypeParameters[0], returnType.TypeArguments()[0]); 1847Assert.Equal(containingType.TypeParameters[1], returnType.TypeArguments()[1]); 1848Assert.Equal(containingType.TypeParameters[2], returnType.TypeArguments()[2]); 1849Assert.Equal(method.TypeParameters[0], returnType.TypeArguments()[3]);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\OverloadResolutionTests.cs (2)
723var typeArgs = ((NamedTypeSymbol)type).TypeArguments(); 984Assert.Equal(TypeKind.Error, ((NamedTypeSymbol)type).TypeArguments()[0].TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (46)
Compilation\SemanticModelAPITests.cs (1)
3627Assert.False(((NamedTypeSymbol)newSymbol).TypeArguments().Single().IsErrorType());
DocumentationComments\CrefTests.cs (4)
1530var expectedSymbol = compilation.GlobalNamespace.GetMember<NamedTypeSymbol>("B").TypeArguments()[0]; 1670AssertEx.All(actualWinner.ContainingType.TypeArguments(), typeParam => TypeSymbol.Equals(typeParam, actualParameterType, TypeCompareKind.ConsiderEverything2)); //CONSIDER: Would be different in Dev11. 1708Assert.Equal(actualParameterType, actualWinner.ContainingType.TypeArguments().Single()); 1709Assert.Equal(actualParameterType, actualWinner.ContainingType.ContainingType.TypeArguments().Single());
Symbols\CompilationCreationTests.cs (6)
2287var args1 = retval1.ContainingType.TypeArguments().Concat(retval1.TypeArguments()); 2312var args3 = retval3.TypeArguments(); 2447Assert.Equal(0, type3.TypeArguments().Length); 2452Assert.Equal(1, typeC6.TypeArguments().Length); 2453Assert.Same(localC6Params[0], typeC6.TypeArguments()[0]);
Symbols\CustomModifiersTests.cs (1)
295var withoutModifiers = withModifiers.OriginalDefinition.Construct(withModifiers.TypeArguments());
Symbols\Metadata\MetadataTypeTests.cs (4)
106Assert.Equal(0, class1.TypeArguments().Length); 156Assert.Equal(2, type1.TypeArguments().Length); 204Assert.Equal(1, type1.TypeArguments().Length); 252Assert.Equal(0, type1.TypeArguments().Length);
Symbols\Metadata\PE\BaseTypeResolution.cs (1)
89Assert.Same(((NamedTypeSymbol)@base).TypeArguments()[0], orderablePartitioner.TypeParameters[0]);
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (9)
31Assert.Equal(0, objectType.TypeArguments().Length); 40Assert.Equal(1, varC1.TypeArguments().Length); 44Assert.Equal(varC1_T, varC1.TypeArguments()[0]); 82Assert.Equal(1, varC2.TypeArguments().Length); 92Assert.Equal(0, varC3.TypeArguments().Length); 97Assert.Equal(1, varC4.TypeArguments().Length); 108Assert.Equal(2, varTC2.TypeArguments().Length); 113Assert.Equal(varTC2_T1, varTC2.TypeArguments()[0]); 114Assert.Equal(varTC2_T2, varTC2.TypeArguments()[1]);
Symbols\Metadata\PE\MissingTypeReferences.cs (1)
89Assert.Equal(genericBase, constructedFrom.Construct(genericBase.TypeArguments()));
Symbols\Metadata\PE\NoPia.cs (3)
1242Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI5_Foo.ReturnType).TypeArguments()[0].Kind); 1250Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI7_Foo.ReturnType).TypeArguments()[0].Kind); 1254Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI7_Bar.ReturnType).TypeArguments()[0].Kind);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
97var outer = ((NamedTypeSymbol)importedField.Type).TypeArguments().Single(); 100var inner = ((NamedTypeSymbol)outer).TypeArguments().Single();
Symbols\Source\BaseClassTests.cs (3)
467Assert.True(c.Interfaces().Single().TypeArguments().Single().IsErrorType()); //can't see base of C while evaluating C.B 1307Assert.Equal(b, (b.BaseType() as NamedTypeSymbol).TypeArguments()[0]); 1339var garg = c.BaseType().TypeArguments()[0];
Symbols\Source\DelegateTests.cs (1)
217Assert.Equal(1, d.TypeArguments().Length);
Symbols\Source\MethodTests.cs (2)
1356var classBTypeArguments = classB.TypeArguments(); 1377var classCBaseTypeArguments = classCBase.TypeArguments();
Symbols\Source\SourcePlusMetadataTests.cs (2)
253var key = a.BaseType().TypeArguments()[0] as NamedTypeSymbol; 254var nam = b.BaseType().TypeArguments()[0] as NamedTypeSymbol;
Symbols\Source\TypeMapTests.cs (2)
27return nts.TypeArguments()[0]; 117Assert.Equal(SpecialType.System_Int32, neti.TypeArguments()[0].SpecialType);
Symbols\TypeTests.cs (4)
859Assert.Equal(1, igoo.TypeArguments().Length); 875Assert.Equal(2, classA.TypeArguments().Length); 886Assert.Equal(3, structS.TypeArguments().Length); 1263Assert.Equal(SymbolKind.ErrorType, typeDi.TypeArguments()[2].Kind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
459var actArgs = namedType.TypeArguments();
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
3349Assert.Equal(@event.Type, fieldType.TypeArguments().Single());