28 references to WithTypeAndModifiers
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Symbols.cs (1)
1642
return type.
WithTypeAndModifiers
(namedTypeRight.AsUnboundGenericType(), type.CustomModifiers);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (11)
160
return ArrayTypeSymbol.CreateSZArray(_otherAssembly, symbol.ElementTypeWithAnnotations.
WithTypeAndModifiers
(otherElementType, otherModifiers));
163
return ArrayTypeSymbol.CreateMDArray(_otherAssembly, symbol.ElementTypeWithAnnotations.
WithTypeAndModifiers
(otherElementType, otherModifiers), symbol.Rank, symbol.Sizes, symbol.LowerBounds);
383
return new PointerTypeSymbol(symbol.PointedAtTypeWithAnnotations.
WithTypeAndModifiers
(otherPointedAtType, otherModifiers));
397
var otherReturnTypeWithAnnotations = sig.ReturnTypeWithAnnotations.
WithTypeAndModifiers
(otherReturnType, VisitCustomModifiers(sig.ReturnTypeWithAnnotations.CustomModifiers));
418
otherParamsBuilder.Add(param.TypeWithAnnotations.
WithTypeAndModifiers
(otherType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers)));
526
var otherType = type.
WithTypeAndModifiers
((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers));
866
return ArrayTypeSymbol.CreateSZArray(symbol.BaseTypeNoUseSiteDiagnostics.ContainingAssembly, symbol.ElementTypeWithAnnotations.
WithTypeAndModifiers
(translatedElementType, translatedModifiers));
869
return ArrayTypeSymbol.CreateMDArray(symbol.BaseTypeNoUseSiteDiagnostics.ContainingAssembly, symbol.ElementTypeWithAnnotations.
WithTypeAndModifiers
(translatedElementType, translatedModifiers), symbol.Rank, symbol.Sizes, symbol.LowerBounds);
906
return new PointerTypeSymbol(symbol.PointedAtTypeWithAnnotations.
WithTypeAndModifiers
(translatedPointedAtType, translatedModifiers));
913
var translatedReturnTypeWithAnnotations = sig.ReturnTypeWithAnnotations.
WithTypeAndModifiers
(translatedReturnType, VisitCustomModifiers(sig.ReturnTypeWithAnnotations.CustomModifiers));
927
translatedParamsBuilder.Add(param.TypeWithAnnotations.
WithTypeAndModifiers
(translatedParamType, VisitCustomModifiers(param.TypeWithAnnotations.CustomModifiers)));
Lowering\MethodToClassRewriter.cs (1)
339
visitedTypeArgs.Add(typeArg.
WithTypeAndModifiers
(VisitType(typeArg.Type), typeArg.CustomModifiers));
Symbols\AbstractTypeMap.cs (1)
396
return substituted.
WithTypeAndModifiers
(dynamicEraser.EraseDynamic(substituted.Type), substituted.CustomModifiers);
Symbols\Metadata\PE\DynamicTypeDecoder.cs (4)
289
transformedTypeArgsBuilder.Add(typeArg.
WithTypeAndModifiers
(transformedTypeArg, typeArg.CustomModifiers));
321
ArrayTypeSymbol.CreateSZArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.
WithTypeAndModifiers
(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers)) :
322
ArrayTypeSymbol.CreateMDArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.
WithTypeAndModifiers
(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers), arrayType.Rank, arrayType.Sizes, arrayType.LowerBounds);
343
new PointerTypeSymbol(pointerType.PointedAtTypeWithAnnotations.
WithTypeAndModifiers
(transformedPointedAtType, pointerType.PointedAtTypeWithAnnotations.CustomModifiers));
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
76
return type.
WithTypeAndModifiers
(transformedType, type.CustomModifiers);
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
310
typeWithAnnotations = typeWithAnnotations.
WithTypeAndModifiers
(typeSymbol, typeWithAnnotations.CustomModifiers);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
194
return underlyingType.
WithTypeAndModifiers
(newTypeSymbol, newModifiers);
Symbols\Source\CustomModifierUtils.cs (1)
59
returnType = returnType.
WithTypeAndModifiers
(CopyTypeCustomModifiers(returnTypeWithCustomModifiers, returnTypeSymbol, destinationMethod.ContainingAssembly),
Symbols\Source\SourceEventSymbol.cs (1)
634
type = type.
WithTypeAndModifiers
(CustomModifierUtils.CopyTypeCustomModifiers(overriddenEventType, type.Type, containingAssembly),
Symbols\Source\SourceParameterSymbol.cs (1)
127
TypeWithAnnotations newTypeWithModifiers = this.TypeWithAnnotations.
WithTypeAndModifiers
(newType, newCustomModifiers);
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
292
_lazyReturnType = _lazyReturnType.
WithTypeAndModifiers
(
Symbols\Source\SourcePropertySymbolBase.cs (1)
258
type = type.
WithTypeAndModifiers
(
Symbols\TypeWithAnnotations.cs (2)
695
result = result.
WithTypeAndModifiers
(newTypeSymbol, result.CustomModifiers);
751
return
WithTypeAndModifiers
(newTypeSymbol, CustomModifiers);