85 references to AsMember
Microsoft.CodeAnalysis.CSharp (85)
Binder\Binder.ValueChecks.cs (1)
893
getItemOrSliceHelper = getItemOrSliceHelper.
AsMember
(getItemOrSliceHelper.ContainingType.Construct(ImmutableArray.Create(elementAccess.Expression.Type.TryGetInlineArrayElementField().TypeWithAnnotations)));
Binder\Binder_Conversions.cs (1)
537
.
AsMember
((NamedTypeSymbol)destination)
Binder\ForEachLoopBinder.cs (4)
711
nullableValueGetter = nullableValueGetter.
AsMember
((NamedTypeSymbol)collectionExprType);
1106
MethodSymbol specificGetEnumeratorMethod = getEnumeratorMethod.
AsMember
(collectionType);
1127
moveNextMethod = moveNextAsync.
AsMember
((NamedTypeSymbol)enumeratorType);
1139
builder.CurrentPropertyGetter = currentPropertyGetter.
AsMember
((NamedTypeSymbol)enumeratorType);
CodeGen\EmitArrayInitializer.cs (3)
575
EmitSymbolToken(rosPointerCtor.
AsMember
(spanType), wrappedExpression.Syntax, optArgList: null);
677
EmitSymbolToken(rosArrayCtor.
AsMember
(spanType), wrappedExpression.Syntax, optArgList: null);
745
EmitSymbolToken(rosArrayCtor.
AsMember
(spanType), arrayCreation.Syntax, optArgList: null);
CodeGen\EmitStackAllocInitializer.cs (1)
76
var spanGetItem = spanGetItemDefinition.
AsMember
(readOnlySpan);
CodeGen\EmitStatement.cs (2)
1633
var spanCharLengthMethod = spanTLengthMethod.
AsMember
((NamedTypeSymbol)keyType);
1658
var spanCharLengthMethod = spanTIndexerMethod.
AsMember
((NamedTypeSymbol)keyType);
Compiler\MethodBodySynthesizer.cs (2)
257
getOrCreateMethod = getOrCreateMethod.
AsMember
(fieldType);
275
processHandlerMethod = processHandlerMethod.
AsMember
(fieldType);
Compiler\MethodBodySynthesizer.Lowered.cs (6)
189
: WellKnownMember.System_Span_T__get_Item).
AsMember
(spanChar),
207
: WellKnownMember.System_Span_T__get_Length).
AsMember
(spanChar))),
388
system_Collections_Generic_EqualityComparer_T__get_Default.
AsMember
(constructedEqualityComparer)),
389
system_Collections_Generic_EqualityComparer_T__GetHashCode.
AsMember
(constructedEqualityComparer),
432
equalityComparer_get_Default.
AsMember
(constructedEqualityComparer)),
433
equalityComparer_Equals.
AsMember
(constructedEqualityComparer),
FlowAnalysis\NullableWalker.cs (3)
6428
var constructedMethod = wellKnownMethod.
AsMember
(constructedType);
10890
valueProperty = getValue?.
AsMember
((NamedTypeSymbol)containingType)?.AssociatedSymbol;
11504
? getResult.OriginalDefinition.
AsMember
(taskAwaiterType)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (19)
207
F.New(stateMachineType.Constructor.
AsMember
(frameType), F.Literal(initialState))));
302
.
AsMember
(IAsyncEnumeratorOfElementType);
307
.
AsMember
(promiseType);
310
.
AsMember
(promiseType);
315
.
AsMember
(moveNextAsyncReturnType);
318
.
AsMember
(moveNextAsyncReturnType);
401
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
453
.
AsMember
((NamedTypeSymbol)IAsyncDisposable_DisposeAsync.ReturnType);
483
.
AsMember
(IAsyncEnumeratorOfElementType);
501
.
AsMember
(IValueTaskSourceOfBool);
505
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
526
.
AsMember
(IValueTaskSourceOfBool);
530
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
552
.
AsMember
(IValueTaskSourceOfBool);
556
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
583
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
607
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
629
.
AsMember
((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
656
.
AsMember
(IAsyncEnumerableOfElementType);
Lowering\ClosureConversion\ClosureConversion.cs (2)
676
MethodSymbol constructor = frame.Constructor.
AsMember
(frameType);
1042
synthesizedMethod = synthesizedMethod.
AsMember
(constructedFrame);
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (1)
215
var result = overload.
AsMember
(method.ContainingType);
Lowering\IteratorRewriter\IteratorRewriter.cs (3)
219
var IEnumeratorOfElementType_get_Current = F.SpecialProperty(SpecialMember.System_Collections_Generic_IEnumerator_T__Current).GetMethod.
AsMember
(IEnumeratorOfElementType);
259
var IEnumerableOfElementType_GetEnumerator = F.SpecialMethod(SpecialMember.System_Collections_Generic_IEnumerable_T__GetEnumerator).
AsMember
(IEnumerableOfElementType);
309
F.New(stateMachineType.Constructor.
AsMember
(frameType), F.Literal(initialState))));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
1908
return UnsafeGetSpecialTypeMethod(syntax, member, compilation, diagnostics).
AsMember
(nullableType2);
1916
result = result.
AsMember
(nullableType2);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (15)
279
var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_ReadOnlySpan_T__ctor_Array)).
AsMember
(spanType);
298
collectionTypeKind == CollectionExpressionTypeKind.Span ? WellKnownMember.System_Span_T__ctor_Array : WellKnownMember.System_ReadOnlySpan_T__ctor_Array)!).
AsMember
(spanType);
319
var listToArray = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ToArray)).
AsMember
((NamedTypeSymbol)list.Type);
671
return _factory.Call(rewrittenSpreadExpression, listToArrayMethod.
AsMember
((NamedTypeSymbol)spreadExpression.Type!));
695
return _factory.Call(rewrittenSpreadExpression, toArrayMethod.
AsMember
((NamedTypeSymbol)rewrittenSpreadExpression.Type!));
864
asSpanMethod = spanCtorArray.
AsMember
(spanOfElementType);
886
asSpanMethod = immutableArrayAsSpanMethod.
AsMember
(namedType);
1009
var spreadLength = _factory.Call(spreadOperandAsSpan, getLengthMethod.
AsMember
((NamedTypeSymbol)spreadOperandAsSpan.Type!));
1010
var targetSlice = _factory.Call(spanTemp, spanSliceMethod.
AsMember
((NamedTypeSymbol)spanTemp.Type!), indexTemp, spreadLength);
1011
sideEffects.Add(_factory.Call(spreadOperandAsSpan, copyToMethod.
AsMember
((NamedTypeSymbol)spreadOperandAsSpan.Type!), targetSlice));
1058
var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctorInt32)).
AsMember
(collectionType);
1082
var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctor)).
AsMember
(collectionType);
1108
var spanGetItem = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Span_T__get_Item)).
AsMember
((NamedTypeSymbol)spanTemp.Type);
1162
var addMethod = _factory.WellKnownMethod(WellKnownMember.System_Collections_Generic_List_T__Add).
AsMember
(collectionType);
1163
var addRangeMethod = _factory.WellKnownMethod(WellKnownMember.System_Collections_Generic_List_T__AddRange, isOptional: true)?.
AsMember
(collectionType);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
115
result = new BoundObjectCreationExpression(node.Syntax, ctor.
AsMember
((NamedTypeSymbol)node.Type), utf8Bytes, _factory.Literal(0), _factory.Literal(length));
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
253
getOrCreateMethod = getOrCreateMethod.
AsMember
(fieldType);
282
invocationListAccessor = invocationListAccessor.
AsMember
(fieldType);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
244
getItemOrSliceHelper = getItemOrSliceHelper.
AsMember
((NamedTypeSymbol)createSpan.ReturnType);
393
getItemOrSliceHelper = getItemOrSliceHelper.
AsMember
((NamedTypeSymbol)createSpan.ReturnType);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
509
readOnlySpanCtorRefParamChar = readOnlySpanCtorRefParamGeneric.
AsMember
(readOnlySpanOfChar);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
66
MethodSymbol smallestConstructor = smallestCtor.
AsMember
(smallestType);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
643
var callSiteFactoryMethod = callSiteFactoryGeneric.
AsMember
(callSiteType);
Lowering\MethodToClassRewriter.cs (1)
648
.
AsMember
((NamedTypeSymbol)TypeMap.SubstituteType(method.ContainingType).AsTypeSymbolOnly())
Lowering\SyntheticBoundNodeFactory.cs (1)
1513
return this.Call(arg, this.SpecialMethod(CodeAnalysis.SpecialMember.System_Nullable_T_get_Value).
AsMember
((NamedTypeSymbol)arg.Type));
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
787
return ((MethodSymbol)member).
AsMember
(translatedType);
Symbols\Compilation_WellKnownMembers.cs (1)
75
/// <see cref="MethodSymbol.
AsMember
"/> to construct an instantiation.
Symbols\MemberSymbolExtensions.cs (1)
274
return ((MethodSymbol)s).
AsMember
(newOwner);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
910
return retargetedDefinition.
AsMember
(retargetedType);
Symbols\SubstitutedEventSymbol.cs (2)
64
return (object?)originalAddMethod == null ? null : originalAddMethod.
AsMember
(_containingType);
73
return (object?)originalRemoveMethod == null ? null : originalRemoveMethod.
AsMember
(_containingType);
Symbols\SubstitutedPropertySymbol.cs (2)
91
return (object)originalGetMethod == null ? null : originalGetMethod.
AsMember
(_containingType);
100
return (object)originalSetMethod == null ? null : originalSetMethod.
AsMember
(_containingType);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
761
equalityComparer_get_Default.
AsMember
(constructedEqualityComparer)),
762
equalityComparer_Equals.
AsMember
(constructedEqualityComparer),