55 references to CreateTupleTypeSymbol
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
1437return CreateTupleTypeSymbol(underlyingType, elementNames, elementLocations, elementNullableAnnotations: default);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (30)
CodeGen\CodeGenTupleTest.cs (30)
5791Assert.Throws<ArgumentNullException>(() => comp.CreateTupleTypeSymbol(null, default(ImmutableArray<string>))); 6213Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType: vt2)); 6256Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6259Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6262Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6314var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vbType, default(ImmutableArray<string>))); 6613var tuple4 = comp.CreateTupleTypeSymbol(tuple1, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")); 6639var tuple2 = comp.CreateTupleTypeSymbol(underlyingType); 6642tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default); 6648tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default, default, default); 6651tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default(ImmutableArray<string>), default(ImmutableArray<Location>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)); 6654tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNames: default); 6657tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementLocations: default); 6660tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6681var tuple2 = comp.CreateTupleTypeSymbol(underlyingType); 6684tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default); 6690tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default, default, default); 6693tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default(ImmutableArray<string>), default(ImmutableArray<Location>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)); 6696tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNames: default); 6699tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementLocations: default); 6702tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6799var tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6802var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 6805tuple2 = comp.CreateTupleTypeSymbol( 6811tuple2 = comp.CreateTupleTypeSymbol( 6818tuple2 = comp.CreateTupleTypeSymbol( 6838var tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6842var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8))); 6845tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.None, 9)); 6849tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.Annotated, 9));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (22)
CodeGen\CodeGenTuples.vb (22)
6866Assert.Throws(Of ArgumentNullException)(Sub() comp.CreateTupleTypeSymbol(underlyingType:=Nothing, elementNames:=Nothing)) 6868Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item1"))) 6873ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, elementLocations:=ImmutableArray.Create(loc1))) 6890Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create(Of String)(Nothing, Nothing)) 6943Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 6963Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")) 6984Dim tupleWithSomeNames = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create(Nothing, "Item2", "Charlie")) 7003Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")) 7025Dim tuple8WithoutNames = comp.CreateTupleTypeSymbol(vt8, Nothing) 7050Dim tuple8WithNames = comp.CreateTupleTypeSymbol(vt8, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")) 7075Dim tuple9WithoutNames = comp.CreateTupleTypeSymbol(vt9, Nothing) 7100Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")) 7125Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")) 7151Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 7173Dim tuple2 = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create("123", " ", Nothing)) 7177Dim tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")) 7194Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))) 7210Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(csType, Nothing)) 8937Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(underlyingType:=vt2)) 8980Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString()) 8983Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString()) 8986Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1482Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 1498Dim tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob"))