160 references to CustomModifiers
Microsoft.CodeAnalysis.CSharp (160)
Binder\Binder_Symbols.cs (1)
1624return type.WithTypeAndModifiers(namedTypeRight.AsUnboundGenericType(), type.CustomModifiers);
Binder\Semantics\Conversions\Conversions.cs (1)
418TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers,
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (18)
156var otherModifiers = VisitCustomModifiers(symbol.ElementTypeWithAnnotations.CustomModifiers); 382var otherModifiers = VisitCustomModifiers(symbol.PointedAtTypeWithAnnotations.CustomModifiers); 397var otherReturnTypeWithAnnotations = sig.ReturnTypeWithAnnotations.WithTypeAndModifiers(otherReturnType, VisitCustomModifiers(sig.ReturnTypeWithAnnotations.CustomModifiers)); 418otherParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(otherType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers))); 526var otherType = type.WithTypeAndModifiers((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers)); 569Debug.Assert(type.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 570Debug.Assert(other.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 626Debug.Assert(type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.All(t => t.CustomModifiers.IsEmpty)); 627Debug.Assert(other.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.All(t => t.CustomModifiers.IsEmpty)); 664Debug.Assert(type.PointedAtTypeWithAnnotations.CustomModifiers.IsEmpty); 665Debug.Assert(other.PointedAtTypeWithAnnotations.CustomModifiers.IsEmpty); 696Debug.Assert(type.CustomModifiers.IsEmpty); 742Debug.Assert(type.CustomModifiers.IsDefaultOrEmpty); 743Debug.Assert(other.CustomModifiers.IsDefaultOrEmpty); 862var translatedModifiers = VisitCustomModifiers(symbol.ElementTypeWithAnnotations.CustomModifiers); 905var translatedModifiers = VisitCustomModifiers(symbol.PointedAtTypeWithAnnotations.CustomModifiers); 913var translatedReturnTypeWithAnnotations = sig.ReturnTypeWithAnnotations.WithTypeAndModifiers(translatedReturnType, VisitCustomModifiers(sig.ReturnTypeWithAnnotations.CustomModifiers)); 927translatedParamsBuilder.Add(param.TypeWithAnnotations.WithTypeAndModifiers(translatedParamType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers)));
Emitter\Model\ArrayTypeSymbolAdapter.cs (2)
29if (elementType.CustomModifiers.Length == 0) 35return new Cci.ModifiedTypeReference(type, ImmutableArray<Cci.ICustomModifier>.CastUp(elementType.CustomModifiers));
Emitter\Model\FieldSymbolAdapter.cs (1)
36var customModifiers = fieldTypeWithAnnotations.CustomModifiers;
Emitter\Model\GenericMethodInstanceReference.cs (1)
36Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\GenericTypeInstanceReference.cs (1)
30Debug.Assert(!underlyingNamedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Any(static a => a.CustomModifiers.Any()));
Emitter\Model\MethodReference.cs (1)
89return ImmutableArray<Cci.ICustomModifier>.CastUp(UnderlyingMethod.ReturnTypeWithAnnotations.CustomModifiers);
Emitter\Model\MethodSymbolAdapter.cs (2)
220return ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedMethodSymbol.ReturnTypeWithAnnotations.CustomModifiers); 255Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
876var modifiers = arguments[i].CustomModifiers;
Emitter\Model\ParameterSymbolAdapter.cs (1)
33return ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedParameterSymbol.TypeWithAnnotations.CustomModifiers);
Emitter\Model\ParameterTypeInformation.cs (1)
31return ImmutableArray<Cci.ICustomModifier>.CastUp(_underlyingParameter.TypeWithAnnotations.CustomModifiers);
Emitter\Model\PointerTypeSymbolAdapter.cs (2)
25if (AdaptedPointerTypeSymbol.PointedAtTypeWithAnnotations.CustomModifiers.Length == 0) 31return new Cci.ModifiedTypeReference(type, ImmutableArray<Cci.ICustomModifier>.CastUp(AdaptedPointerTypeSymbol.PointedAtTypeWithAnnotations.CustomModifiers));
Emitter\Model\PropertySymbolAdapter.cs (1)
184return AdaptedPropertySymbol.TypeWithAnnotations.CustomModifiers.As<ICustomModifier>();
Emitter\Model\SpecializedFieldReference.cs (1)
64var customModifiers = oldType.CustomModifiers;
Emitter\Model\SpecializedGenericMethodInstanceReference.cs (1)
37Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\SpecializedGenericNestedTypeInstanceReference.cs (1)
29Debug.Assert(!underlyingNamedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Any(static a => a.CustomModifiers.Any()));
Lowering\MethodToClassRewriter.cs (1)
339visitedTypeArgs.Add(typeArg.WithTypeAndModifiers(VisitType(typeArg.Type), typeArg.CustomModifiers));
Symbols\AbstractTypeMap.cs (1)
396return substituted.WithTypeAndModifiers(dynamicEraser.EraseDynamic(substituted.Type), substituted.CustomModifiers);
Symbols\Compilation_WellKnownMembers.cs (3)
949HandleCustomModifiers(((ArrayTypeSymbol)type).ElementTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder); 958HandleCustomModifiers(((PointerTypeSymbol)type).PointedAtTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder); 1024HandleCustomModifiers(twa.CustomModifiers.Length, transformFlagsBuilder);
Symbols\ConstructedNamedTypeSymbol.cs (1)
124if (GetUnificationUseSiteDiagnosticRecursive(ref result, typeArg.CustomModifiers, owner, ref checkedTypes))
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
648var modifiersToSearch = RefKind != RefKind.None ? RefCustomModifiers : ReturnTypeWithAnnotations.CustomModifiers; 671var modifiersToSearch = RefKind != RefKind.None ? RefCustomModifiers : ReturnTypeWithAnnotations.CustomModifiers;
Symbols\MemberSignatureComparer.cs (2)
593(unsubstitutedReturnType1.CustomModifiers.IsEmpty && unsubstitutedReturnType2.CustomModifiers.IsEmpty))
Symbols\MemberSymbolExtensions.cs (4)
205count += methodReturnType.CustomModifiers.Length + method.RefCustomModifiers.Length; 211count += paramType.CustomModifiers.Length + param.RefCustomModifiers.Length; 254count += type.CustomModifiers.Length + property.RefCustomModifiers.Length; 260count += paramType.CustomModifiers.Length + param.RefCustomModifiers.Length;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (7)
289transformedTypeArgsBuilder.Add(typeArg.WithTypeAndModifiers(transformedTypeArg, typeArg.CustomModifiers)); 307if (!HandleCustomModifiers(arrayType.ElementTypeWithAnnotations.CustomModifiers.Length)) 321ArrayTypeSymbol.CreateSZArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.WithTypeAndModifiers(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers)) : 322ArrayTypeSymbol.CreateMDArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.WithTypeAndModifiers(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers), arrayType.Rank, arrayType.Sizes, arrayType.LowerBounds); 330if (!HandleCustomModifiers(pointerType.PointedAtTypeWithAnnotations.CustomModifiers.Length)) 343new PointerTypeSymbol(pointerType.PointedAtTypeWithAnnotations.WithTypeAndModifiers(transformedPointedAtType, pointerType.PointedAtTypeWithAnnotations.CustomModifiers)); 402|| !decoder.HandleCustomModifiers(typeWithAnnotations.CustomModifiers.Length))
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (3)
186CustomModifiersMatch(fieldType.CustomModifiers, fieldInfo.CustomModifiers)) 266if (!CustomModifiersMatch(substituted.CustomModifiers, targetParam.CustomModifiers) || 294if (!CustomModifiersMatch(substituted.CustomModifiers, targetReturnParam.CustomModifiers) ||
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
76return type.WithTypeAndModifiers(transformedType, type.CustomModifiers);
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1414ReturnTypeWithAnnotations.CustomModifiers.HasIsExternalInitModifier();
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
310typeWithAnnotations = typeWithAnnotations.WithTypeAndModifiers(typeSymbol, typeWithAnnotations.CustomModifiers); 434refCustomModifiers.NullToEmpty().Length + type.CustomModifiers.Length,
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
121TypeWithAnnotations.Create(decoded, metadataType.NullableAnnotation, metadataType.CustomModifiers); 346TypeWithAnnotations.Create(decoded, typeWithAnnotations.NullableAnnotation, typeWithAnnotations.CustomModifiers);
Symbols\MethodSymbol.cs (1)
1163AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\OverriddenOrHiddenMembersHelpers.cs (3)
669Debug.Assert(!(param.TypeWithAnnotations.CustomModifiers.Any() || param.RefCustomModifiers.Any())); 894return methodReturnType.CustomModifiers.Any() || method.RefCustomModifiers.Any() || 899return propertyType.CustomModifiers.Any() || property.RefCustomModifiers.Any() ||
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
64ImmutableArray<CustomModifier> IArrayTypeSymbol.CustomModifiers => _underlying.ElementTypeWithAnnotations.CustomModifiers;
Symbols\PublicModel\FieldSymbol.cs (1)
55get { return _underlying.TypeWithAnnotations.CustomModifiers; }
Symbols\PublicModel\MethodSymbol.cs (1)
254return _underlying.ReturnTypeWithAnnotations.CustomModifiers;
Symbols\PublicModel\NamedTypeSymbol.cs (1)
96return UnderlyingNamedTypeSymbol.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[ordinal].CustomModifiers;
Symbols\PublicModel\ParameterSymbol.cs (1)
43get { return _underlying.TypeWithAnnotations.CustomModifiers; }
Symbols\PublicModel\PointerTypeSymbol.cs (1)
49get { return _underlying.PointedAtTypeWithAnnotations.CustomModifiers; }
Symbols\PublicModel\PropertySymbol.cs (1)
98get { return _underlying.TypeWithAnnotations.CustomModifiers; }
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
190var newModifiers = RetargetModifiers(underlyingType.CustomModifiers, out modifiersHaveChanged);
Symbols\SignatureOnlyMethodSymbol.cs (1)
48Debug.Assert(returnType.IsDefault || isInitOnly == CustomModifierUtils.HasIsExternalInitModifier(returnType.CustomModifiers));
Symbols\SignatureOnlyParameterSymbol.cs (3)
119_type.CustomModifiers.Equals(other._type.CustomModifiers) && 131Hash.CombineValues(_type.CustomModifiers),
Symbols\Source\CustomModifierUtils.cs (4)
60sourceMethodReturnType.CustomModifiers); 131if (sourceParameter.TypeWithAnnotations.CustomModifiers.Any() || sourceParameter.RefCustomModifiers.Any() || 133destinationParameter.TypeWithAnnotations.CustomModifiers.Any() || destinationParameter.RefCustomModifiers.Any() || 145sourceParameter.TypeWithAnnotations.CustomModifiers,
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
403compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length));
Symbols\Source\SourceEventSymbol.cs (2)
333AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length)); 635eventWithCustomModifiers.TypeWithAnnotations.CustomModifiers);
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
84Debug.Assert(_lazyReturnType.CustomModifiers.IsEmpty); 146Debug.Assert(_lazyReturnType.CustomModifiers.IsEmpty);
Symbols\Source\SourceParameterSymbolBase.cs (1)
97AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
294type.CustomModifiers);
Symbols\Source\SourcePropertySymbolBase.cs (2)
260overriddenPropertyType.CustomModifiers); 1373compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + RefCustomModifiers.Length, _refKind));
Symbols\SubstitutedParameterSymbol.cs (2)
57if (substituted.CustomModifiers.IsEmpty && 58this._underlyingParameter.TypeWithAnnotations.CustomModifiers.IsEmpty &&
Symbols\Symbol.cs (1)
1231DeriveUseSiteInfoFromCustomModifiers(ref result, type.CustomModifiers, allowedRequiredModifierType);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
65AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type, typeWithAnnotations.CustomModifiers.Length));
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
158AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\TypeSymbolExtensions.cs (2)
817foreach (var customModifier in typeWithAnnotationsOpt.CustomModifiers) 1957typeWithAnnotations = TypeWithAnnotations.Create(type, customModifiers: typeWithAnnotations.CustomModifiers);
Symbols\TypeUnification.cs (32)
34Debug.Assert(substituted1.CustomModifiers.SequenceEqual(substituted2.CustomModifiers)); 92if (TypeSymbol.Equals(t1.Type, t2.Type, TypeCompareKind.CLRSignatureCompareOptions) && t1.CustomModifiers.SequenceEqual(t2.CustomModifiers)) 113if (t2.TypeKind != t1.TypeKind || !t2.CustomModifiers.SequenceEqual(t1.CustomModifiers)) 130if (t2.TypeKind != t1.TypeKind || !t2.CustomModifiers.SequenceEqual(t1.CustomModifiers)) 143if (t2.TypeKind != t1.TypeKind || !t2.CustomModifiers.SequenceEqual(t1.CustomModifiers)) 199if (t1.CustomModifiers.IsDefaultOrEmpty) 205if (t1.CustomModifiers.SequenceEqual(t2.CustomModifiers)) 211if (t1.CustomModifiers.Length < t2.CustomModifiers.Length && 212t1.CustomModifiers.SequenceEqual(t2.CustomModifiers.Take(t1.CustomModifiers.Length))) 216customModifiers: ImmutableArray.Create(t2.CustomModifiers, t1.CustomModifiers.Length, t2.CustomModifiers.Length - t1.CustomModifiers.Length))); 224if (t2.CustomModifiers.IsDefaultOrEmpty) 230if (t2.CustomModifiers.Length < t1.CustomModifiers.Length && 231t2.CustomModifiers.SequenceEqual(t1.CustomModifiers.Take(t2.CustomModifiers.Length))) 235customModifiers: ImmutableArray.Create(t1.CustomModifiers, t2.CustomModifiers.Length, t1.CustomModifiers.Length - t2.CustomModifiers.Length)));
Symbols\TypeWithAnnotations.cs (23)
115return Create(Type, NullableAnnotation.Annotated, CustomModifiers); 125return Create(Type, NullableAnnotation.NotAnnotated, CustomModifiers); 196Debug.Assert(CustomModifiers.IsEmpty); 204return CreateNonLazyType(typeSymbol, NullableAnnotation.Annotated, this.CustomModifiers); 247return Create(type, nullableAnnotation, CustomModifiers); 359!this.CustomModifiers.SequenceEqual(other.CustomModifiers)) 427Symbol.GetUnificationUseSiteDiagnosticRecursive(ref result, this.CustomModifiers, owner, ref checkedTypes); 444var newCustomModifiers = typeMap.SubstituteCustomModifiers(this.CustomModifiers); 451Debug.Assert(newTypeWithModifiers.CustomModifiers.IsEmpty); 455newCustomModifiers == CustomModifiers) 469newCustomModifiers == CustomModifiers) 513return CreateLazySubstitutedType(newTypeWithModifiers.DefaultType, newCustomModifiers.Concat(newTypeWithModifiers.CustomModifiers), typeParameter); 536newCustomModifiers.Concat(newTypeWithModifiers.CustomModifiers)); 564CustomModifiers.IsEmpty; 571_extensions.WithTypeAndModifiers(this, typeSymbol, CustomModifiers); 695result = result.WithTypeAndModifiers(newTypeSymbol, result.CustomModifiers); 712result = CreateNonLazyType(newTypeSymbol, NullableAnnotation.Oblivious, result.CustomModifiers); 732return CreateNonLazyType(typeSymbol, NullableAnnotation.NotAnnotated, CustomModifiers); 745return CreateNonLazyType(newTypeSymbol, NullableAnnotation.Oblivious, CustomModifiers); 751return WithTypeAndModifiers(newTypeSymbol, CustomModifiers); 1069Debug.Assert(underlying.CustomModifiers.IsEmpty); 1163newUnderlying.CustomModifiers.IsEmpty)
Utilities\TypeSymbolExtensions.cs (2)
76=> typeWithAnnotations.CustomModifiers.Length + typeWithAnnotations.Type.CustomModifierCount(); 158=> typeWithAnnotations.CustomModifiers.Any() || typeWithAnnotations.Type.HasCustomModifiers(flagNonDefaultArraySizesOrLowerBounds);