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