31 overrides of TypeParameters
Microsoft.CodeAnalysis.CSharp (31)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
159public override ImmutableArray<TypeParameterSymbol> TypeParameters
Lowering\SynthesizedMethodBaseSymbol.cs (1)
76public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
113public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\ErrorMethodSymbol.cs (1)
150public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
32public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
820public override ImmutableArray<TypeParameterSymbol> TypeParameters => ImmutableArray<TypeParameterSymbol>.Empty;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
906public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\NativeIntegerTypeSymbol.cs (1)
356public override ImmutableArray<TypeParameterSymbol> TypeParameters => ImmutableArray<TypeParameterSymbol>.Empty;
Symbols\ReducedExtensionMethodSymbol.cs (1)
286public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
93public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\SignatureOnlyMethodSymbol.cs (1)
71public override ImmutableArray<TypeParameterSymbol> TypeParameters { get { return _typeParameters; } }
Symbols\Source\LambdaSymbol.cs (1)
193public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\LocalFunctionSymbol.cs (1)
317public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceConstructorSymbolBase.cs (1)
140public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
145public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceDestructorSymbol.cs (1)
110public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceEventAccessorSymbol.cs (1)
186public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (1)
80public abstract override ImmutableArray<TypeParameterSymbol> TypeParameters { get; }
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
335public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
998public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\SubstitutedMethodSymbol.cs (1)
92public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
176public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
92public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
160public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
86public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
132public sealed override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
163public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
247public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
209public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
131public override ImmutableArray<TypeParameterSymbol> TypeParameters
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
64public override ImmutableArray<TypeParameterSymbol> TypeParameters
486 references to TypeParameters
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder_Conversions.cs (2)
1470var typeParameters = member.TypeParameters; 1520member.TypeParameters,
Binder\InMethodBinder.cs (1)
334var typeParameters = _methodSymbol.TypeParameters;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
3280constructedFromMethod.TypeParameters,
Binder\WithMethodTypeParametersBinder.cs (2)
45foreach (var typeParameter in _methodSymbol.TypeParameters) 69foreach (var parameter in _methodSymbol.TypeParameters)
Compilation\SyntaxTreeSemanticModel.cs (1)
2220return this.GetTypeParameterSymbol(methodSymbol.TypeParameters, typeParameter).GetPublicSymbol();
Compiler\ClsComplianceChecker.cs (1)
331CheckTypeParameterCompliance(symbol.TypeParameters, symbol.ContainingType);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (4)
451SymbolKind.Method => ((MethodSymbol)otherContainer).TypeParameters, 611method.TypeParameters.SequenceEqual(other.TypeParameters, AreTypesEqual); 618var typeParameters = method.TypeParameters;
Emitter\Model\MethodSymbolAdapter.cs (1)
337foreach (var @param in AdaptedMethodSymbol.TypeParameters)
Emitter\NoPia\EmbeddedMethod.cs (1)
47return UnderlyingMethod.AdaptedMethodSymbol.TypeParameters.SelectAsArray((t, m) => new EmbeddedTypeParameter(m, t.GetCciAdapter()), this);
Lowering\ClosureConversion\ClosureConversion.cs (1)
190_currentTypeParameters = method.TypeParameters;
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (4)
193var typeMap = (methodDefinition.Arity > 0) ? new TypeMap(overload.TypeParameters, methodDefinition.TypeParameters) : null; 210methodDefinition.TypeParameters, 212overload.TypeParameters,
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
185if (usedTypeParametersContains(usedTypeParameters, enclosingMethod.TypeParameters))
Lowering\LocalRewriter\LocalRewriter.cs (1)
389var typeParameters = localFunction.TypeParameters;
Symbols\ConstraintsHelper.cs (1)
873((MethodSymbol)method.OriginalDefinition).TypeParameters,
Symbols\ConstructedMethodSymbol.cs (1)
20map: new TypeMap(constructedFrom.ContainingType, ((MethodSymbol)constructedFrom.OriginalDefinition).TypeParameters, typeArgumentsWithAnnotations),
Symbols\Extensions\RewrittenLambdaOrLocalFunctionSymbol.cs (1)
16: base(lambdaOrLocalFunctionSymbol, containingMethod.TypeMap, lambdaOrLocalFunctionSymbol.TypeParameters)
Symbols\Extensions\SourceExtensionImplementationMethodSymbol.cs (1)
21: base(sourceMethod, TypeMap.Empty, sourceMethod.ContainingType.TypeParameters.Concat(sourceMethod.TypeParameters))
Symbols\MemberSymbolExtensions.cs (3)
137? method.ContainingType.TypeParameters.Concat(method.TypeParameters) 138: method.TypeParameters; 561return ((MethodSymbol)symbol).TypeParameters;
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
228candidateMethod.TypeParameters,
Symbols\Metadata\PE\PENamedTypeSymbol.cs (3)
499ImmutableArray<TypeParameterSymbol> combinedTypeParameters = @this.TypeParameters.Concat(method.TypeParameters); 500var typeMap = combinedTypeParameters.IsEmpty ? null : new TypeMap(combinedTypeParameters, candidate.TypeParameters); 538candidate.TypeParameters,
Symbols\MethodSymbol.cs (3)
275return TypeMap.TypeParametersAsTypeSymbolsWithAnnotations(TypeParameters); 883if (ConstructedNamedTypeSymbol.TypeParametersMatchTypeArguments(this.TypeParameters, typeArguments)) 980GetUnificationUseSiteDiagnosticRecursive(ref diagnosticInfo, this.TypeParameters, this, ref unificationCheckedTypes))
Symbols\PublicModel\MethodSymbol.cs (1)
118return _underlying.TypeParameters.GetPublicSymbols();
Symbols\ReducedExtensionMethodSymbol.cs (2)
174var typeParams = method.TypeParameters; 234method.TypeParameters,
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
106this.RetargetingTranslator.Retarget(_underlyingMethod.TypeParameters), default(ImmutableArray<TypeParameterSymbol>));
Symbols\Source\ParameterHelpers.cs (1)
212methodOwner.TypeParameters :
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
988overriddenMethod = overriddenMethod.Construct(TypeMap.TypeParametersAsTypeSymbolsWithIgnoredAnnotations(overridingMethod.TypeParameters));
Symbols\Source\SourceMemberMethodSymbol.cs (3)
838return TypeParameters.Length; 934foreach (var typeParameter in this.TypeParameters) 1018foreach (var typeParameter in method.TypeParameters)
Symbols\Source\SourceMethodSymbol.cs (2)
24/// array of types, indexed by the constrained type parameter in <see cref="MethodSymbol.TypeParameters"/>. 30/// array of kinds, indexed by the constrained type parameter in <see cref="MethodSymbol.TypeParameters"/>.
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
686overriddenOrExplicitlyImplementedMethod.TypeParameters[i], overriddenOrExplicitlyImplementedMethod);
Symbols\Source\SourceTypeParameterSymbol.cs (3)
653get { return Owner.TypeParameters; } 814return ((object)overriddenMethod != null) ? overriddenMethod.TypeParameters[ordinal] : null; 826var overriddenTypeParameters = overriddenMethod.TypeParameters;
Symbols\SubstitutedMethodSymbol.cs (3)
58_lazyTypeParameters = constructedFrom.TypeParameters; 119typeParameters = prevMap.SubstituteTypeParameters(this.OriginalDefinition.TypeParameters); 415var typeParameters = method.OriginalDefinition.TypeParameters;
Symbols\SubstitutedTypeParameterSymbol.cs (1)
71return reducedFrom.TypeParameters[this.Ordinal];
Symbols\TypeMap.cs (2)
147return WithAlphaRename(oldOwner.OriginalDefinition.TypeParameters, newOwner, out newTypeParameters); 170var currentParameters = oldOwner.OriginalDefinition.TypeParameters;
Symbols\TypeSymbol.cs (4)
1622interfaceMethod.TypeParameters, 1964implementedMethod = implementedMethod.Construct(TypeMap.TypeParametersAsTypeSymbolsWithIgnoredAnnotations(implementingMethod.TypeParameters)); 2117var typeParameters1 = interfaceMethod.TypeParameters; 2118var typeParameters2 = implicitImpl.TypeParameters;
Symbols\VarianceSafety.cs (1)
160CheckTypeParametersVarianceSafety(method.TypeParameters, method, diagnostics);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
CodeGen\CodeGenLocalFunctionTests.cs (3)
5250var attrs4 = localFn4.TypeParameters.Single().GetAttributes(); 5638Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.TypeParameters.Single().GetAttributes())); 5649Assert.Empty(localFn1.TypeParameters.Single().GetAttributes());
CodeGen\CodeGenTupleTest.cs (7)
11635var typeParameters1 = ((MethodSymbol)members1[i]).TypeParameters; 11636var typeParameters2 = ((MethodSymbol)members2[i]).TypeParameters; 12861Assert.True(m1ToString.TypeParameters.IsEmpty); 13536Assert.NotSame(m9Test.TypeParameters.Single(), m9Test.TypeParameters.Single().OriginalDefinition); 13537Assert.Same(m9Test, m9Test.TypeParameters.Single().ContainingSymbol); 13539Assert.Equal(0, m9Test.TypeParameters.Single().Ordinal);
CodeGen\DestructorTests.cs (1)
836Assert.Equal(0, destructor.TypeParameters.Length);
Emit\EmitMetadataTests.cs (3)
472Assert.Same(m5.TypeParameters[0], m5.Parameters[0].Type); 473Assert.Same(m5.TypeParameters[1], m5.Parameters[1].Type); 617Assert.Equal(0, ctor.TypeParameters.Length);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (21)
Emit\UnmanagedTypeModifierTests.cs (21)
639var parentTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 645var childTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 674var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 687var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 720var parentTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 726var childTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 752var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 765var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 795var parentTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 801var childTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 827var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 840var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 870var parentTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 876var childTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 902var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 915var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("M").TypeParameters.Single(); 945var parentTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 951var childTypeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("Parent.M").TypeParameters.Single(); 978var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Parent").GetMethod("M").TypeParameters.Single(); 991var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Child").GetMethod("Parent.M").TypeParameters.Single(); 1446var typeParameter = c.GlobalNamespace.GetTypeMember("TestRef").GetMethod("M").TypeParameters.Single();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (35)
Attributes\AttributeTests.cs (4)
5097var typeParam1 = gooMethod.TypeParameters[0]; 5101var typeParam2 = gooMethod.TypeParameters[1]; 5828var methodTypeParameter = method.TypeParameters.Single(); 10000Assert.Equal("XAttribute", mm.TypeParameters.Single().GetAttributes().Single().ToString());
Attributes\AttributeTests_IsUnmanaged.cs (8)
40var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("M").TypeParameters.Single(); 94var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__N|0_0").TypeParameters.Single(); 143var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("M").TypeParameters.Single(); 205var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__N|0_0").TypeParameters.Single(); 260var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("M").TypeParameters.Single(); 323var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__N|0_0").TypeParameters.Single(); 373var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("M").TypeParameters.Single(); 420var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__N|0_0").TypeParameters.Single();
Attributes\AttributeTests_Synthesized.cs (1)
631var typeParameter = baseMethodWrapper.TypeParameters.Single();
RefStructInterfacesTests.cs (22)
4430var t = method.TypeParameters.Single(); 4693var t = method.TypeParameters.Single(); 4730var t = method.TypeParameters.Single(); 4785var t = method.TypeParameters.Single(); 4822var t = method.TypeParameters.Single(); 5261var t = method.TypeParameters.Single(); 5290var t = method.TypeParameters.Single(); 5319var t = method.TypeParameters.Single(); 5348var t = method.TypeParameters.Single(); 5377var t = method.TypeParameters.Single(); 5421var t1 = method1.TypeParameters.Single(); 5425var t2 = method2.TypeParameters.Single(); 5460var t1 = method1.TypeParameters.Single(); 5464var t2 = method2.TypeParameters.Single(); 5515var t1 = method1.TypeParameters.Single(); 5520var t2 = method2.TypeParameters.Single(); 5558var t1 = method1.TypeParameters.Single(); 5562var t2 = method2.TypeParameters.Single(); 5593var t1 = method1.TypeParameters.Single(); 5597var t2 = method2.TypeParameters.Single(); 5644var t1 = method1.TypeParameters.Single(); 5649var t2 = method2.TypeParameters.Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (226)
Semantics\BindingTests.cs (1)
2662var tt = foo.TypeParameters[0];
Semantics\DynamicTests.cs (1)
2186var ebc = m.TypeParameters[0].EffectiveBaseClassNoUseSiteDiagnostics;
Semantics\GenericConstraintsTests.cs (7)
630var constraintTypeNames = method.TypeParameters.Single().ConstraintTypes().Select(type => type.ToTestDisplayString()); 1143var constraintTypeNames = method.TypeParameters.Single().ConstraintTypes().Select(type => type.ToTestDisplayString()); 1628var constraintTypeNames = method.TypeParameters.Single().ConstraintTypes().Select(type => type.ToTestDisplayString()); 2143var typeParameter = module.GlobalNamespace.GetTypeMember("Test").GetMethod("M").TypeParameters.Single(); 2194var typeParameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__N|0_0").TypeParameters.Single(); 3145Assert.Equal(declaredMethod.TypeParameters.Single().GetPublicSymbol(), inferredMethod.TypeArguments.Single()); 3201Assert.Equal(declaredMethod.TypeParameters.Single().GetPublicSymbol(), inferredMethod.TypeArguments.Single());
Semantics\LambdaTests.cs (1)
5637var expectedType = comp.GetMember<MethodSymbol>("Program.F").TypeParameters.Single().GetPublicSymbol();
Semantics\NativeIntegerTests.cs (1)
1184comp.GetMember<MethodSymbol>("B.F").TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].Type;
Semantics\NullableReferenceTypesTests.cs (215)
9027constraintType = method.TypeParameters.Single().ConstraintTypesNoUseSiteDiagnostics.Single(); 13208Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 13326var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13334var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13413var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13688Assert.False(m1.Parameters[0].TypeWithAnnotations.Equals(m1.OverriddenMethod.ConstructIfGeneric(m1.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14028Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14033Assert.True(m3.ReturnTypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14135Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14140Assert.True(m3.Parameters[0].TypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 16503var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 16511var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17733var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17741var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17801var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17809var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17877var m1Def = m1.ConstructIfGeneric(m1Impl.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 97693TypeParameterSymbol t1 = f1.TypeParameters[0]; 97703TypeParameterSymbol t2 = f2.TypeParameters[0]; 97864TypeParameterSymbol t2 = f2.TypeParameters[0]; 98470TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98485TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98529TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98537TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98543TypeParameterSymbol t2 = af2.TypeParameters[0]; 98661TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98676TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98768TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98783TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98834TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98852TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98907TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98924TypeParameterSymbol t22 = bf2.TypeParameters[0]; 98975TypeParameterSymbol t11 = bf1.TypeParameters[0]; 98990TypeParameterSymbol t22 = bf2.TypeParameters[0]; 99026TypeParameterSymbol t11 = bf1.TypeParameters[0]; 99031TypeParameterSymbol t22 = bf2.TypeParameters[0]; 99065TypeParameterSymbol t2 = f2.TypeParameters[0]; 99349TypeParameterSymbol t11 = bf1.TypeParameters[0]; 99364TypeParameterSymbol t22 = bf2.TypeParameters[0]; 100136TypeParameterSymbol t11 = bf1.TypeParameters[0]; 100140TypeParameterSymbol t22 = bf2.TypeParameters[0]; 100144TypeParameterSymbol t33 = bf3.TypeParameters[0]; 100148TypeParameterSymbol t44 = bf4.TypeParameters[0]; 100171TypeParameterSymbol t11 = bf1.TypeParameters[0]; 100175TypeParameterSymbol t22 = bf2.TypeParameters[0]; 100179TypeParameterSymbol t33 = bf3.TypeParameters[0]; 100183TypeParameterSymbol t44 = bf4.TypeParameters[0]; 100263TypeParameterSymbol t222 = bf2.TypeParameters[0]; 100267TypeParameterSymbol t333 = bf3.TypeParameters[0]; 100290TypeParameterSymbol t222 = bf2.TypeParameters[0]; 100294TypeParameterSymbol t333 = bf3.TypeParameters[0]; 100343TypeParameterSymbol t1 = f1.TypeParameters[0]; 100381TypeParameterSymbol t1 = f1.TypeParameters[0]; 100425TypeParameterSymbol t1 = f1.TypeParameters[0]; 100432TypeParameterSymbol t2 = f2.TypeParameters[0]; 100464TypeParameterSymbol t1 = f1.TypeParameters[0]; 100484TypeParameterSymbol t1 = f1.TypeParameters[0]; 100539TypeParameterSymbol t1 = f1.TypeParameters[0]; 100547TypeParameterSymbol t2 = f2.TypeParameters[0]; 100583TypeParameterSymbol t1 = f1.TypeParameters[0]; 100590TypeParameterSymbol t2 = f2.TypeParameters[0]; 100613Assert.True(((MethodSymbol)comp.SourceModule.GlobalNamespace.GetMember("B.F1")).TypeParameters[0].IsNotNullable); 100628TypeParameterSymbol t1 = f1.TypeParameters[0]; 100635TypeParameterSymbol t2 = f2.TypeParameters[0]; 100667TypeParameterSymbol t1 = f1.TypeParameters[0]; 100717TypeParameterSymbol at1 = af1.TypeParameters[0]; 100731Assert.Null(impl.TypeParameters[0].IsNotNullable); 100747TypeParameterSymbol tf1 = bf1.TypeParameters[0]; 100762Assert.Null(impl.TypeParameters[0].IsNotNullable); 100812TypeParameterSymbol at1 = af1.TypeParameters[0]; 100840TypeParameterSymbol tf1 = bf1.TypeParameters[0]; 100900TypeParameterSymbol at1 = af1.TypeParameters[0]; 100925TypeParameterSymbol tf1 = bf1.TypeParameters[0]; 100961TypeParameterSymbol t1 = f1.TypeParameters[0]; 100985TypeParameterSymbol t1 = f1.TypeParameters[0]; 101010TypeParameterSymbol t1 = f1.TypeParameters[0]; 101037TypeParameterSymbol t1 = f1.TypeParameters[0]; 101086TypeParameterSymbol at1 = af1.TypeParameters[0]; 101111TypeParameterSymbol tf1 = bf1.TypeParameters[0]; 101168TypeParameterSymbol at1 = af1.TypeParameters[0]; 101193TypeParameterSymbol tf1 = bf1.TypeParameters[0]; 101970TypeParameterSymbol tf1 = f1.TypeParameters[0]; 101993foreach (TypeParameterSymbol tf1 in f1.TypeParameters) 102022TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102049TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102076TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102103TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102130TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102172TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102203TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102241TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102275foreach (TypeParameterSymbol tf1 in f1.TypeParameters) 102315TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102353TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102380TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102408TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102436TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102475TypeParameterSymbol tf1 = f1.TypeParameters[0]; 102503TypeParameterSymbol tf1 = f1.TypeParameters[0]; 104206Assert.Null(m1.TypeParameters[0].IsNotNullable); 104207Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104228Assert.Null(m1.TypeParameters[0].IsNotNullable); 104229Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104254Assert.False(m1.TypeParameters[0].IsNotNullable); 104255Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104275Assert.False(m1.TypeParameters[0].IsNotNullable); 104276Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104325Assert.False(m1.TypeParameters[0].IsNotNullable); 104326Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104351Assert.Null(m1.TypeParameters[0].IsNotNullable); 104352Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104381Assert.False(m1.TypeParameters[0].IsNotNullable); 104382Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104413Assert.Null(m1.TypeParameters[0].IsNotNullable); 104414Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104468Assert.Null(m1.TypeParameters[0].IsNotNullable); 104469Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104563Assert.False(m1.TypeParameters[0].IsNotNullable); 104564Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104590Assert.Null(m1.TypeParameters[0].IsNotNullable); 104591Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104640Assert.True(m1.TypeParameters[0].IsNotNullable); 104641Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104666Assert.True(m1.TypeParameters[0].IsNotNullable); 104667Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104697Assert.True(m1.TypeParameters[0].IsNotNullable); 104698Assert.False(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104729Assert.False(m1.TypeParameters[0].IsNotNullable); 104730Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104783Assert.False(m1.TypeParameters[0].IsNotNullable); 104784Assert.Null(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104852TypeParameterSymbol t11 = bf1.TypeParameters[0]; 104865TypeParameterSymbol t1 = af1.TypeParameters[0]; 104879TypeParameterSymbol t22 = bf2.TypeParameters[0]; 104893TypeParameterSymbol t2 = af2.TypeParameters[0]; 104956TypeParameterSymbol t11 = bf1.TypeParameters[0]; 104963TypeParameterSymbol t22 = bf2.TypeParameters[0]; 105033TypeParameterSymbol t11 = bf1.TypeParameters[0]; 105040TypeParameterSymbol t22 = bf2.TypeParameters[0]; 105131Assert.True(m1.TypeParameters[0].IsNotNullable); 105135Assert.True(baseM1.TypeParameters[0].IsNotNullable); 105175Assert.Null(m1.TypeParameters[0].IsNotNullable); 105179Assert.Null(baseM1.TypeParameters[0].IsNotNullable); 105224Assert.True(m1.TypeParameters[0].IsNotNullable); 105228Assert.True(baseM1.TypeParameters[0].IsNotNullable); 105260Assert.True(m1.TypeParameters[0].IsNotNullable); 105264Assert.True(baseM1.TypeParameters[0].IsNotNullable); 106201Assert.Null(m1.TypeParameters[0].IsNotNullable); 106232Assert.True(m1.TypeParameters[0].IsNotNullable); 106263Assert.False(m1.TypeParameters[0].IsNotNullable); 106295Assert.Null(m1.TypeParameters[0].IsNotNullable); 106328Assert.Null(m1.TypeParameters[0].IsNotNullable); 106361Assert.True(m1.TypeParameters[0].IsNotNullable); 106393Assert.True(m1.TypeParameters[0].IsNotNullable); 106425Assert.True(m1.TypeParameters[0].IsNotNullable); 106458Assert.True(m1.TypeParameters[0].IsNotNullable); 106488Assert.Null(m1.TypeParameters[0].IsNotNullable); 106519Assert.Null(m1.TypeParameters[0].IsNotNullable); 106550Assert.True(m1.TypeParameters[0].IsNotNullable); 106582Assert.True(m1.TypeParameters[0].IsNotNullable); 106614Assert.True(m1.TypeParameters[0].IsNotNullable); 106647Assert.True(m1.TypeParameters[0].IsNotNullable); 106678Assert.True(m1.TypeParameters[0].IsNotNullable); 106710Assert.True(m1.TypeParameters[0].IsNotNullable); 106741Assert.True(m1.TypeParameters[0].IsNotNullable); 106773Assert.True(m1.TypeParameters[0].IsNotNullable); 106803Assert.True(m1.TypeParameters[0].IsNotNullable); 106833Assert.True(m1.TypeParameters[0].IsNotNullable); 106863Assert.Null(m1.TypeParameters[0].IsNotNullable); 106893Assert.True(m1.TypeParameters[0].IsNotNullable); 107083Assert.Null(m1.TypeParameters[0].IsNotNullable); 107087Assert.Null(m2.TypeParameters[0].IsNotNullable); 107091Assert.Null(m3.TypeParameters[0].IsNotNullable); 107095Assert.Null(m4.TypeParameters[0].IsNotNullable); 107099Assert.True(m5.TypeParameters[0].IsNotNullable); 107103Assert.True(m6.TypeParameters[0].IsNotNullable); 107107Assert.False(m7.TypeParameters[0].IsNotNullable); 107111Assert.True(m8.TypeParameters[0].IsNotNullable); 107115Assert.True(m9.TypeParameters[0].IsNotNullable); 107119Assert.Null(m10.TypeParameters[0].IsNotNullable); 107154Assert.Null(m1.TypeParameters[0].IsNotNullable); 107189Assert.Null(m1.TypeParameters[0].IsNotNullable); 107220Assert.Null(m1.TypeParameters[0].IsNotNullable); 107257Assert.Null(m1.TypeParameters[0].IsNotNullable); 107293Assert.Null(m1.TypeParameters[0].IsNotNullable); 107330Assert.True(m1.TypeParameters[0].IsNotNullable); 107366Assert.True(m1.TypeParameters[0].IsNotNullable); 107404Assert.Null(t2m1.TypeParameters[0].IsNotNullable); 107408Assert.Null(t3m1.TypeParameters[0].IsNotNullable); 107451Assert.Null(t3m1.TypeParameters[0].IsNotNullable); 107489Assert.True(t2m1.TypeParameters[0].IsNotNullable); 107493Assert.True(t3m1.TypeParameters[0].IsNotNullable); 107530Assert.Null(m1.TypeParameters[0].IsNotNullable); 107566Assert.Null(m1.TypeParameters[0].IsNotNullable); 107603Assert.True(m1.TypeParameters[0].IsNotNullable); 107639Assert.True(m1.TypeParameters[0].IsNotNullable); 107675Assert.False(m1.TypeParameters[0].IsNotNullable); 107711Assert.True(m1.TypeParameters[0].IsNotNullable); 107747Assert.Null(m1.TypeParameters[0].IsNotNullable); 108317TypeParameterSymbol tm1 = m1.TypeParameters[0]; 111755var constraintTypes = comp.GetMember<MethodSymbol>(methodName).TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics; 138809Assert.Equal("System.IEquatable<T>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138810Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138833Assert.True(f.TypeParameters[0].ReferenceTypeConstraintIsNullable); 138834Assert.Equal("System.IEquatable<T?>!", f.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 138835Assert.Null(f.PartialImplementationPart.TypeParameters[0].ReferenceTypeConstraintIsNullable); 138836Assert.Equal("System.IEquatable<T>", f.PartialImplementationPart.TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics.Single().ToTestDisplayString(true)); 150582Assert.True(comp.GetMember<MethodSymbol>("B1.F").TypeParameters[0].IsValueType); 150583Assert.False(comp.GetMember<MethodSymbol>("B2.F").TypeParameters[0].IsValueType); 150584Assert.True(comp.GetMember<MethodSymbol>("B3.F").TypeParameters[0].IsValueType); 158382var t = ((MethodSymbol)comp.GetMember("C.M")).TypeParameters.Single(); 158415var t = ((MethodSymbol)comp.GetMember("C.M")).TypeParameters.Single(); 158637var t = ((MethodSymbol)comp.GetMember("C.M")).TypeParameters.Single(); 158674var t = ((MethodSymbol)comp.GetMember("C.M")).TypeParameters.Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (126)
DocumentationComments\CrefTests.cs (3)
1484Assert.NotEqual(expectedOriginalDefinitionSymbol.TypeParameters.Single(), typeArgument); 1510Assert.NotEqual(expectedOriginalDefinitionSymbol.TypeParameters.Single(), typeArgument); 1607Assert.NotEqual(expectedOriginalDefinitionSymbol.TypeParameters.Single(), typeArgument);
DocumentationComments\ParameterTests.cs (3)
87var typeParameter = method.TypeParameters.Single().ISymbol; 354var typeParameters = method.TypeParameters.GetPublicSymbols(); 379var typeParameter = method.TypeParameters.Single().ISymbol;
Symbols\CompilationCreationTests.cs (2)
2386Assert.Equal(0, foo2.TypeParameters.Length); 2398var foo3TypeParams = foo3.TypeParameters;
Symbols\CSharpCompilerFeatureRequiredTests.cs (1)
217Assert.True(onMethodTypeParameterMethod.TypeParameters[0].HasUnsupportedMetadata);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
376var t = m.TypeParameters.Single();
Symbols\GenericConstraintTests.cs (53)
83CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T"); 87CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T"); 91CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, true, false, "ValueType", "int", "int"); 117CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, true, "C", "C", "C"); 157CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T"); 161CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "I<T>"); 166CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T"); 171CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "I<T>"); 4884var typeParameter = method.TypeParameters[0]; 4889typeParameter = method.TypeParameters[1]; 4895typeParameter = method.TypeParameters[0]; 4900typeParameter = method.TypeParameters[1]; 5175CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T", "U"); 5178CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T", "I<U>", "I<object>"); 5181CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "I<T>", "I<U>"); 5184CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "T"); 5187CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "I<object>", "I<T>"); 5190CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "I<I<U>>"); 5331CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5332CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.ValueType, true, false, "ValueType", "ValueType"); 5334CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5335CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.ValueType, true, false, "ValueType", "ValueType"); 5337CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "ValueType", "ValueType", "ValueType"); 5338CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.ValueType, true, false, "ValueType", "ValueType"); 5512CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5514CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5516CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5518CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5520CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5522CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5524CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5526CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5528CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5530CheckConstraints(type.GetMethod("I<System.Object>.M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5532CheckConstraints(type.BaseType().GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5567CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5569CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.None, false, true, "C", "C", "C"); 5631CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object"); 5632CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.ValueType, true, false, "ValueType", "ValueType"); 5634CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "ValueType", "ValueType", "ValueType"); 5635CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.ValueType, true, false, "ValueType", "ValueType", "ValueType"); 5637CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "IA"); 5638CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "IB"); 5639CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "A", "A", "A"); 5640CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "B", "B", "B"); 5642CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "IA"); 5643CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.None, false, false, "object", "object", "IB", "IA"); 5644CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "A", "A", "A", "IA"); 5645CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "B", "B", "B", "IA"); 5647CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "A", "A", "IA", "A"); 5648CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "A", "A", "IB", "A"); 5649CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "A", "A", "A"); 5650CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.None, false, true, "B", "B", "B", "A");
Symbols\LocalFunctionTests.cs (2)
591m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 630m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString()));
Symbols\Metadata\MetadataMemberTests.cs (3)
175Assert.Equal(0, ctor.TypeParameters.Length); 225Assert.Equal(0, member1.TypeParameters.Length); 331Assert.Equal(0, member2.TypeParameters.Length);
Symbols\Metadata\PE\LoadingMethods.cs (2)
159Assert.Equal(0, basicC1_M11.TypeParameters[0].ConstraintTypes().Length); 160Assert.Same(basicC1, basicC1_M11.TypeParameters[1].ConstraintTypes().Single());
Symbols\OverriddenOrHiddenMembersTests.cs (1)
98var ofV = ImmutableArray.Create<TypeSymbol>(D_MofV.TypeParameters[0]);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
245TypeParameterSymbol testTypeParameter = testMethod.TypeParameters[0];
Symbols\Retargeting\RetargetingTests.cs (2)
1234CheckSymbols(a.TypeParameters, b.TypeParameters, true);
Symbols\Source\FileModifierTests.cs (1)
3040var cInt = (ConstructedNamedTypeSymbol)comp.GetMember<MethodSymbol>("D.M").TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].Type;
Symbols\Source\MethodTests.cs (3)
345var t = m.TypeParameters[0]; 1363var classBMethodMTypeParameters = classBMethodM.TypeParameters; 1386var classCBaseMethodMTypeParameters = classCBaseMethodM.TypeParameters;
Symbols\StaticAbstractMembersInInterfacesTests.cs (45)
8448Assert.Equal("void I1.M01()", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0], "M01").Single().ToTestDisplayString()); 8449Assert.Contains("void I1.M01()", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 8450Assert.Equal("void I1.M01()", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0], "M01").Single().ToTestDisplayString()); 8451Assert.Contains("void I1.M01()", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 8453Assert.Equal("void I1.M01()", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "M01").Single().ToTestDisplayString()); 8454Assert.Contains("void I1.M01()", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 8455Assert.Equal("void I1.M01()", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "M01").Single().ToTestDisplayString()); 8456Assert.Contains("void I1.M01()", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 8458Assert.Contains("M01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol())); 13174Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13175Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13176Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13177Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13179Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13180Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13181Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13182Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13184Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol())); 13260Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13261Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13262Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13263Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13265Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13266Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13267Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13268Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13270Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol())); 13382Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13383Assert.Equal("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0], "P01").Single().ToTestDisplayString()); 13384Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13385Assert.Contains("System.Int32 I1.P01 { get; set; }", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 13387Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13388Assert.Equal("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "P01").Single().ToTestDisplayString()); 13389Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13390Assert.Contains("System.Int32 I1.P01 { get; set; }", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 13392Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol())); 14092Assert.Equal("event System.Action I1.E01", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0], "E01").Single().ToTestDisplayString()); 14093Assert.Equal("event System.Action I1.E01", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0], "E01").Single().ToTestDisplayString()); 14094Assert.Contains("event System.Action I1.E01", ((CSharpSemanticModel)model).LookupSymbols(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 14095Assert.Contains("event System.Action I1.E01", ((CSharpSemanticModel)model).LookupStaticMembers(node.SpanStart, m02.TypeParameters[0]).ToTestDisplayStrings()); 14097Assert.Equal("event System.Action I1.E01", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "E01").Single().ToTestDisplayString()); 14098Assert.Equal("event System.Action I1.E01", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol(), "E01").Single().ToTestDisplayString()); 14099Assert.Contains("event System.Action I1.E01", model.LookupSymbols(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 14100Assert.Contains("event System.Action I1.E01", model.LookupStaticMembers(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()).ToTestDisplayStrings()); 14102Assert.Contains("E01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
Symbols\SymbolErrorTests.cs (3)
3788Assert.Equal(2, f.TypeParameters.Length); 3789var param1 = f.TypeParameters[0]; 3790var param2 = f.TypeParameters[1];
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
FunctionPointerUtilities.cs (1)
94Assert.Empty(symbol.TypeParameters);
TestAttributesVisitor.cs (1)
56VisitList(method.TypeParameters);
UsesIsNullableVisitor.cs (1)
54return AddIfUsesIsNullable(symbol, symbol.TypeParameters, inProgress: null) ||