8 overrides of TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (8)
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
26public override TypeWithAnnotations TypeWithAnnotations { get; }
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
904public override TypeWithAnnotations TypeWithAnnotations
Symbols\SignatureOnlyParameterSymbol.cs (1)
37public override TypeWithAnnotations TypeWithAnnotations { get { return _type; } }
Symbols\Source\SourceClonedParameterSymbol.cs (1)
83public override TypeWithAnnotations TypeWithAnnotations
Symbols\Source\SourceParameterSymbol.cs (1)
268public sealed override TypeWithAnnotations TypeWithAnnotations
Symbols\Source\ThisParameterSymbol.cs (1)
32public override TypeWithAnnotations TypeWithAnnotations
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
45public override TypeWithAnnotations TypeWithAnnotations => _type;
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
39public override TypeWithAnnotations TypeWithAnnotations
289 references to TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (118)
Binder\Binder_Attributes.cs (1)
389var paramType = parameter.TypeWithAnnotations;
Binder\Binder_Expressions.cs (1)
3242var type = parameters[paramNum].TypeWithAnnotations;
Binder\Binder_Invocation.cs (1)
1451isCast ? new ConversionGroup(conversion, parameter.TypeWithAnnotations) : null,
Binder\Binder_Statements.cs (1)
2126if (delegateParameters[i].TypeWithAnnotations.IsStatic)
Binder\Semantics\Conversions\Conversions.cs (1)
320TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers, parameter.IsParams, parameter.RefKind);
Binder\Semantics\Conversions\ConversionsBase.cs (3)
1482if (delegateParameters[p].TypeWithAnnotations.IsStatic) 3177if (!hasConversion(sourceParam.RefKind, destinationSig.Parameters[i].TypeWithAnnotations, sourceSig.Parameters[i].TypeWithAnnotations, ref useSiteInfo))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (9)
1475ExactInference(anonymousFunction.ParameterTypeWithAnnotations(i), delegateParameters[i].TypeWithAnnotations, ref useSiteInfo); 2229UpperBoundInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2233ExactInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2579LowerBoundInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo); 2583ExactInference(sourceParam.TypeWithAnnotations, targetParam.TypeWithAnnotations, ref useSiteInfo);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
3158types.Add(parameter.TypeWithAnnotations); 3245var type = parameter.TypeWithAnnotations;
BoundTree\UnboundLambda.cs (1)
1072typesBuilder.Add(p.TypeWithAnnotations);
Compilation\CSharpCompilation.cs (1)
2068var firstType = method.Parameters[0].TypeWithAnnotations;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (10)
631otherParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(otherType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers))); 727(x, y) => isCorrespondingType(x.TypeWithAnnotations, y.TypeWithAnnotations) && 891ValidateFunctionPointerParamOrReturn(param.TypeWithAnnotations, param.RefKind, param.RefCustomModifiers, allowOut: true); 892ValidateFunctionPointerParamOrReturn(otherParam.TypeWithAnnotations, otherParam.RefKind, otherParam.RefCustomModifiers, allowOut: true); 894return param.RefKind == otherParam.RefKind && AreTypesEqual(param.TypeWithAnnotations, otherParam.TypeWithAnnotations); 1127translatedParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(translatedParamType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers)));
Emitter\Model\ParameterSymbolAdapter.cs (1)
30return ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedParameterSymbol.TypeWithAnnotations.CustomModifiers);
Emitter\Model\ParameterTypeInformation.cs (1)
31return ImmutableArray<Cci.ICustomModifier>.CastUp(_underlyingParameter.TypeWithAnnotations.CustomModifiers);
FlowAnalysis\NullableWalker.cs (20)
559EnterParameter(methodThisParameter, methodThisParameter.TypeWithAnnotations); 1227(hasMaybeNullWhenFalse && ShouldReportNullableAssignment(parameter.TypeWithAnnotations, parameterState)); 1235(hasMaybeNullWhenTrue && ShouldReportNullableAssignment(parameter.TypeWithAnnotations, parameterState)); 1876parameterType = parameter.TypeWithAnnotations; 2734var parameterType = i >= signatureParameters.Length ? parameter.TypeWithAnnotations : signatureParameters[i].TypeWithAnnotations; 2769var parameterLValueType = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 4672var targetTypeWithNullability = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 5775var parameterType = method.Parameters[0].TypeWithAnnotations; 7004var type = parameter.TypeWithAnnotations; 8488var parameterType = ApplyLValueAnnotations(parameter.TypeWithAnnotations, parameterAnnotations); 8930var parameterType = parameter.TypeWithAnnotations; 9332var nestedRight = CreatePlaceholderIfNecessary(invocation.Arguments[i + offset], parameter.TypeWithAnnotations); 9338parameter, parameter.TypeWithAnnotations, GetParameterAnnotations(parameter), new VisitArgumentResult(new VisitResult(variable.Type.ToTypeWithState(), variable.Type), stateForLambda: default), 9351variable.Expression, parameter.RefKind, parameter, parameter.TypeWithAnnotations, GetRValueAnnotations(parameter), 9552targetTypeOfOperandConversion = incrementOperator.Parameters[0].TypeWithAnnotations; 9731var paramType = parameter.TypeWithAnnotations; 9777parameter.TypeWithAnnotations; 10350parameter.TypeWithAnnotations, 10926parameter.TypeWithAnnotations,
FlowAnalysis\NullableWalker_Patterns.cs (1)
413var parameterType = method.Parameters[i + extensionExtra].TypeWithAnnotations;
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
116return frame.TypeMap.SubstituteType(((object)local != null ? local.TypeWithAnnotations : ((ParameterSymbol)variable).TypeWithAnnotations).Type).Type;
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
536if (p.TypeWithAnnotations.IsRestrictedType())
Lowering\SynthesizedMethodBaseSymbol.cs (1)
135this.TypeMap.SubstituteType(p.OriginalDefinition.TypeWithAnnotations),
Symbols\Compilation_WellKnownMembers.cs (1)
979handle(param.RefKind, param.RefCustomModifiers, param.TypeWithAnnotations);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
596param.TypeWithAnnotations.AddNullableTransforms(transforms); 610madeParamChanges |= param.TypeWithAnnotations.ApplyNullableTransforms(defaultTransformFlag, transforms, ref position, out var newParamType);
Symbols\MemberSignatureComparer.cs (2)
724var type1 = SubstituteType(typeMap1, param1.TypeWithAnnotations); 725var type2 = SubstituteType(typeMap2, param2.TypeWithAnnotations);
Symbols\MemberSymbolExtensions.cs (2)
210var paramType = param.TypeWithAnnotations; 259var paramType = param.TypeWithAnnotations;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
369var (transformedParamType, paramTransformed) = handle(ref this, param.RefKind, param.RefCustomModifiers, param.TypeWithAnnotations);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
260var substituted = candidateParam.TypeWithAnnotations.SubstituteType(candidateMethodTypeMap);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
189if (TransformTypeWithAnnotations(param.TypeWithAnnotations) is not { } transformedParam) 194paramsModified = paramsModified || !transformedParam.IsSameAs(param.TypeWithAnnotations);
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
221var decodedParam = DecodeTypeInternal(param.TypeWithAnnotations); 222paramsModified = paramsModified || !decodedParam.IsSameAs(param.TypeWithAnnotations);
Symbols\NativeIntegerTypeSymbol.cs (1)
393public override TypeWithAnnotations TypeWithAnnotations => _containingType.SubstituteUnderlyingType(_underlyingParameter.TypeWithAnnotations);
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
669Debug.Assert(!(param.TypeWithAnnotations.CustomModifiers.Any() || param.RefCustomModifiers.Any()));
Symbols\ParameterSignature.cs (1)
44types.Add(parameter.TypeWithAnnotations);
Symbols\ParameterSymbol.cs (1)
54public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\PublicModel\ParameterSymbol.cs (3)
32Interlocked.CompareExchange(ref _lazyType, _underlying.TypeWithAnnotations.GetPublicSymbol(), null); 39CodeAnalysis.NullableAnnotation IParameterSymbol.NullableAnnotation => _underlying.TypeWithAnnotations.ToPublicAnnotation(); 43get { return _underlying.TypeWithAnnotations.CustomModifiers; }
Symbols\ReducedExtensionMethodSymbol.cs (2)
247_reducedFrom.Parameters[0].TypeWithAnnotations.ToPublicAnnotation(); 622get { return _containingMethod._typeMap.SubstituteType(this._underlyingParameter.TypeWithAnnotations); }
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
41return this.RetargetingModule.RetargetingTranslator.Retarget(_underlyingParameter.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (4)
778var newParameterType = Retarget(parameter.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode); 782parametersModified = parametersModified || !parameter.TypeWithAnnotations.IsSameAs(newParameterType) || customModifiersChanged; 1028translator.Retarget(param.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode), 1106Retarget(param.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode),
Symbols\Source\CustomModifierUtils.cs (3)
131if (sourceParameter.TypeWithAnnotations.CustomModifiers.Any() || sourceParameter.RefCustomModifiers.Any() || 133destinationParameter.TypeWithAnnotations.CustomModifiers.Any() || destinationParameter.RefCustomModifiers.Any() || 145sourceParameter.TypeWithAnnotations.CustomModifiers,
Symbols\Source\ParameterHelpers.cs (3)
192ReportParameterErrors(owner, parameterSyntax, parameter.Ordinal, lastParameterIndex: lastIndex, parameter.IsParams, parameter.TypeWithAnnotations, 282if (parameter.TypeWithAnnotations.ContainsNativeIntegerWrapperType()) 380if (parameter.TypeWithAnnotations.NeedsNullableAttribute())
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
113if (!parameterSymbol.TypeWithAnnotations.IsAtLeastAsVisibleAs(delegateType, ref useSiteInfo))
Symbols\Source\SourceMemberContainerSymbol.cs (6)
3688var propertyParamType = (((i == numParams - 1) && !getNotSet) ? propertySymbol.TypeWithAnnotations : propertyParams[i].TypeWithAnnotations).Type; 4027ctor.Parameters.SelectAsArray<ParameterSymbol, ParameterSymbol>(param => new SignatureOnlyParameterSymbol(param.TypeWithAnnotations, 4263param.TypeWithAnnotations, 4282&& field.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions)) 4291&& prop.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions)) 4309param.TypeWithAnnotations,
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1295var baseParameterType = baseParameter.TypeWithAnnotations; 1298var overrideParameterType = getNotNullIfNotNullOutputType(overrideParameter.TypeWithAnnotations, overrideParameter.NotNullIfParameterNotNull); 1333if (notNullIfParameterNotNull.Contains(overrideParam.Name) && NullableWalker.GetParameterState(baseParam.TypeWithAnnotations, baseParam.FlowAnalysisAnnotations).IsNotNull)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
265if (!parameter.TypeWithAnnotations.IsAtLeastAsVisibleAs(this, ref useSiteInfo))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
191forceMethodTypeParameters(param.TypeWithAnnotations, this, declaredConstraints); 221var parameter0Type = this.Parameters[0].TypeWithAnnotations;
Symbols\Source\SourceParameterSymbolBase.cs (1)
89var type = this.TypeWithAnnotations;
Symbols\SubstitutedParameterSymbol.cs (2)
55TypeWithAnnotations substituted = ((TypeMap)mapOrType).SubstituteType(this._underlyingParameter.TypeWithAnnotations); 58this._underlyingParameter.TypeWithAnnotations.CustomModifiers.IsEmpty &&
Symbols\Symbol.cs (3)
1098return DeriveUseSiteInfoFromType(ref result, param.TypeWithAnnotations, AllowedRequiredModifierType.None) || 1234if (parameter.TypeWithAnnotations.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes) || 1522builder.AddValue(((ParameterSymbol)this).TypeWithAnnotations);
Symbols\SymbolExtensions.cs (1)
519returnType = parameter.TypeWithAnnotations;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
50=> ParameterSymbol.TypeWithAnnotations;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
46param.TypeWithAnnotations,
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
288oldParam.TypeWithAnnotations,
Symbols\TypeSymbolExtensions.cs (3)
891(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 908next = currentPointer.Parameters[i].TypeWithAnnotations; 1964var paramType = param.TypeWithAnnotations;
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
41get { return _underlyingParameter.TypeWithAnnotations; }
Utilities\TypeSymbolExtensions.cs (1)
120if (!param.RefCustomModifiers.IsEmpty || checkTypeWithAnnotations(param.TypeWithAnnotations, flagNonDefaultArraySizesOrLowerBounds))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (47)
CodeGen\CodeGenLocalFunctionTests.cs (2)
5367Assert.Equal(NullableAnnotation.Annotated, param.TypeWithAnnotations.NullableAnnotation); 6170var synthesizedParam = SynthesizedParameterSymbol.Create(localFunction, param.TypeWithAnnotations, ordinal: 0, RefKind.Out, param.Name, baseParameterForAttributes: (SourceComplexParameterSymbolBase)param);
CodeGen\CodeGenTupleTest.cs (2)
951var partialParamType = partialNamesMethod.Parameters.Single().TypeWithAnnotations; 957var allNullParamType = allNullNamesMethod.Parameters.Single().TypeWithAnnotations;
Emit\EmitCustomModifiers.cs (3)
606Assert.False(parameter.TypeWithAnnotations.CustomModifiers.IsEmpty); 662Assert.False(baseParameter.TypeWithAnnotations.CustomModifiers.IsEmpty); 670Assert.False(derivedParameter.TypeWithAnnotations.CustomModifiers.IsEmpty);
Emit\EmitMetadataTests.cs (2)
2093Assert.Equal(invoke.Parameters[i].TypeWithAnnotations, endInvoke.Parameters[k].TypeWithAnnotations);
Emit\InAttributeModifierTests.cs (38)
1649Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1669Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1855Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1875Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 1955Assert.Empty(invokeParameter.TypeWithAnnotations.CustomModifiers); 1959Assert.Empty(beginInvokeParameter.TypeWithAnnotations.CustomModifiers); 1963Assert.Empty(endInvokeParameter.TypeWithAnnotations.CustomModifiers); 2004Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2024Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2044Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2064Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2085Assert.Empty(parameters[0].TypeWithAnnotations.CustomModifiers); 2088Assert.Empty(parameters[1].TypeWithAnnotations.CustomModifiers); 2108Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2495Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2521Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2543Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2568Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2590Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2616Assert.Empty(implicitParameter.TypeWithAnnotations.CustomModifiers); 2623Assert.Empty(explicitParameter.TypeWithAnnotations.CustomModifiers); 2645Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2671Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2693Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 2718Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3194Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3220Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3242Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3268Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3290Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3316Assert.Empty(implicitParameter.TypeWithAnnotations.CustomModifiers); 3323Assert.Empty(explicitParameter.TypeWithAnnotations.CustomModifiers); 3345Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3371Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3393Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3419Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3666Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers); 3738Assert.Empty(parameter.TypeWithAnnotations.CustomModifiers);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Attributes\AttributeTests_Dynamic.cs (1)
538Assert.Equal("System.Boolean[]", dynamicAttribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Synthesized.cs (2)
65Assert.Equal("System.Int32", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString()); 93Assert.Equal("System.Diagnostics.DebuggableAttribute.DebuggingModes", attribute.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Attributes\AttributeTests_Tuples.cs (1)
629Assert.Equal("System.String[]", tupleAttr.AttributeConstructor.Parameters.Single().TypeWithAnnotations.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (3)
Symbols\EEMethodSymbol.cs (2)
215return SynthesizedParameterSymbol.Create(this, sourceParameter.TypeWithAnnotations, ordinal, sourceParameter.RefKind, name, ScopedKind.None, refCustomModifiers: sourceParameter.RefCustomModifiers); 716var typeNameKind = GeneratedNameParser.GetKind(_thisParameter.TypeWithAnnotations.Type.Name);
Symbols\ObjectIdLocalSymbol.cs (1)
80m => method.Parameters.SelectAsArray(p => SynthesizedParameterSymbol.Create(m, p.TypeWithAnnotations, p.Ordinal, p.RefKind, p.Name, p.EffectiveScope, refCustomModifiers: p.RefCustomModifiers)));
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
ExpressionCompilerTestBase.cs (1)
451: candidates.FirstOrDefault(c => parameterTypeNames.SequenceEqual(((MethodSymbol)c).Parameters.Select(p => p.TypeWithAnnotations.Type.Name)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (62)
Semantics\NativeIntegerTests.cs (2)
581verifyTypes(parameter.TypeWithAnnotations, underlyingParameter.TypeWithAnnotations);
Semantics\NullableReferenceTypesTests.cs (55)
8796TypeWithAnnotations getParameterType(CSharpCompilation c) => c.GetMember<MethodSymbol>("A.F").Parameters[0].TypeWithAnnotations; 8927Assert.Equal(NullableAnnotation.Oblivious, indexer.Parameters[0].TypeWithAnnotations.NullableAnnotation); 8930Assert.Equal(NullableAnnotation.Oblivious, method.Parameters[0].TypeWithAnnotations.NullableAnnotation); 8980verifyTuple(method.Parameters[0].TypeWithAnnotations); 9042Assert.Equal(NullableAnnotation.Oblivious, parameter.TypeWithAnnotations.NullableAnnotation); 12088Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 12335Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12336Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12417Assert.Equal(expectMatch, member.Parameters.Single().TypeWithAnnotations.Equals(member.OverriddenMethod.Parameters.Single().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12703Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12704Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12791Assert.True(ev.TypeWithAnnotations.Equals(ev.AddMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12792Assert.True(ev.TypeWithAnnotations.Equals(ev.RemoveMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 12888Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13040Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13131Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 13676Assert.False(m1.Parameters[0].TypeWithAnnotations.Equals(m1.OverriddenMethod.ConstructIfGeneric(m1.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 13887Assert.Equal(NullableAnnotation.Annotated, m1.Parameters[0].TypeWithAnnotations.NullableAnnotation); 14123Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14128Assert.True(m3.Parameters[0].TypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 16474Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 16482Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 16602Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenProperty.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16608Assert.True(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenProperty.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16618Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16684Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16690Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16700Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 16766Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16772Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions & ~TypeCompareKind.AllNullableIgnoreOptions)); 16782Assert.True(property.TypeWithAnnotations.Equals(property.SetMethod.Parameters.Last().TypeWithAnnotations, TypeCompareKind.ConsiderEverything)); 17695Assert.False(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 17703Assert.True(implementing.Parameters[0].TypeWithAnnotations.Equals(implemented.Parameters[0].TypeWithAnnotations, 17842Assert.False(m1Impl.Parameters[i].TypeWithAnnotations.Equals(m1Def.Parameters[i].TypeWithAnnotations, 17846Assert.True(m1Impl.Parameters[3].TypeWithAnnotations.Equals(m1Def.Parameters[3].TypeWithAnnotations, 135164Assert.True(dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation == NullableAnnotation.Annotated); 135192Assert.Equal(NullableAnnotation.Annotated, c2Goo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 135363Assert.Equal(NullableAnnotation.Annotated, dGoo.Parameters[0].TypeWithAnnotations.NullableAnnotation); 145606var parameterType = method.Parameters[0].TypeWithAnnotations;
Semantics\RecordTests.cs (2)
12503var parameterType = method.Parameters[0].TypeWithAnnotations; 12504Assert.True(method.OverriddenMethod.Parameters[0].TypeWithAnnotations.Equals(parameterType, TypeCompareKind.ConsiderEverything));
Semantics\SemanticAnalyzerTests.cs (3)
1468Assert.Equal("Int32", call.Constructor.Parameters[0].TypeWithAnnotations.Type.Name); 1503Assert.Equal("String", call.Constructor.Parameters[0].TypeWithAnnotations.Type.Name); 1538Assert.Equal("Int32", newExpr.Constructor.Parameters[0].TypeWithAnnotations.Type.Name);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (53)
Symbols\CorLibrary\CorTypes.cs (1)
44Parameters[0].TypeWithAnnotations;
Symbols\CustomModifiersTests.cs (3)
1235Assert.True(test.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.SequenceEqual(test.SetMethod.Parameters.First().TypeWithAnnotations.CustomModifiers)); 2482var t1 = test1.Parameters[0].TypeWithAnnotations; 2483var t2 = test2.Parameters[0].TypeWithAnnotations;
Symbols\Metadata\PE\LoadCustomModifiers.cs (6)
58Assert.Equal(1, p1.TypeWithAnnotations.CustomModifiers.Length); 60var p1Mod = p1.TypeWithAnnotations.CustomModifiers[0]; 65Assert.Equal(2, p2.TypeWithAnnotations.CustomModifiers.Length); 67foreach (var p2Mod in p2.TypeWithAnnotations.CustomModifiers) 86Assert.Equal(0, p5.TypeWithAnnotations.CustomModifiers.Length); 98Assert.Equal(0, p6.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Metadata\PE\LoadingIndexers.cs (2)
727Assert.NotEqual(parameterModoptIndexer.Parameters.Last().TypeWithAnnotations.CustomModifiers.Length, parameterModoptIndexer.GetMethod.Parameters.Last().TypeWithAnnotations.CustomModifiers.Length);
Symbols\Metadata\PE\LoadingMethods.cs (1)
76Assert.Equal(0, localM1_1.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Retargeting\RetargetCustomModifiers.cs (8)
69Assert.Equal(1, p1.TypeWithAnnotations.CustomModifiers.Length); 71var p1Mod = p1.TypeWithAnnotations.CustomModifiers[0]; 77Assert.Equal(2, p2.TypeWithAnnotations.CustomModifiers.Length); 79foreach (var p2Mod in p2.TypeWithAnnotations.CustomModifiers) 94Assert.Equal(0, p5.TypeWithAnnotations.CustomModifiers.Length); 107Assert.Equal(0, p6.TypeWithAnnotations.CustomModifiers.Length); 204Assert.Equal(0, p1.TypeWithAnnotations.CustomModifiers.Length); 214Assert.Equal(0, p1.TypeWithAnnotations.CustomModifiers.Length);
Symbols\Retargeting\RetargetingTests.cs (6)
891getModifierTypeSymbol(param1Original.TypeWithAnnotations.CustomModifiers), 892getModifierTypeSymbol(param1Retargeted.TypeWithAnnotations.CustomModifiers)); 901getModifierTypeSymbol(param2Original.TypeWithAnnotations.CustomModifiers), 902getModifierTypeSymbol(param2Retargeted.TypeWithAnnotations.CustomModifiers)); 1248CheckSymbols(a.TypeWithAnnotations, b.TypeWithAnnotations, false);
Symbols\Source\CustomModifierCopyTests.cs (25)
337CheckCustomModifier(onParameterType, method.Parameters.Single().TypeWithAnnotations.CustomModifiers); 433Assert.False(class3Method1.Parameters.Single().TypeWithAnnotations.CustomModifiers.Any()); 477var classMethod1CustomModifiers = classMethod1.Parameters.Single().TypeWithAnnotations.CustomModifiers; 1652Assert.Equal(int16Type, baseProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1653Assert.Equal(int16Type, derivedProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1658Assert.Equal(int16Type, baseIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1659Assert.Equal(int16Type, derivedIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1661Assert.Equal(int32Type, baseIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1662Assert.Equal(int32Type, derivedIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1664Assert.Equal(int64Type, baseIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1665Assert.Equal(int64Type, derivedIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1774Assert.Equal(int16Type, baseIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1775Assert.Equal(int16Type, derivedIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1866Assert.Equal(int16Type, interfaceProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1867Assert.Equal(int16Type, implementationProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1872Assert.Equal(int16Type, interfaceIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1873Assert.Equal(int16Type, implementationIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1875Assert.Equal(int32Type, interfaceIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1876Assert.Equal(int32Type, implementationIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1878Assert.Equal(int64Type, interfaceIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1879Assert.Equal(int64Type, implementationIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1973Assert.Equal(int16Type, interfaceIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 1974Assert.Equal(int16Type, implementationIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); 2002Assert.Equal(ConstModOptType, param.TypeWithAnnotations.CustomModifiers.Single().Modifier.ToTestDisplayString()); 2011Assert.Equal(0, param.TypeWithAnnotations.CustomModifiers.Length);
Symbols\SymbolErrorTests.cs (1)
3359var ptype = param.TypeWithAnnotations;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
96if (UsesIsNullable(parameter.TypeWithAnnotations, inProgress))