85 references to AsMember
Microsoft.CodeAnalysis.CSharp (85)
Binder\Binder.ValueChecks.cs (1)
916getItemOrSliceHelper = 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)
711nullableValueGetter = nullableValueGetter.AsMember((NamedTypeSymbol)collectionExprType); 1106MethodSymbol specificGetEnumeratorMethod = getEnumeratorMethod.AsMember(collectionType); 1127moveNextMethod = moveNextAsync.AsMember((NamedTypeSymbol)enumeratorType); 1139builder.CurrentPropertyGetter = currentPropertyGetter.AsMember((NamedTypeSymbol)enumeratorType);
CodeGen\EmitArrayInitializer.cs (3)
575EmitSymbolToken(rosPointerCtor.AsMember(spanType), wrappedExpression.Syntax, optArgList: null); 677EmitSymbolToken(rosArrayCtor.AsMember(spanType), wrappedExpression.Syntax, optArgList: null); 745EmitSymbolToken(rosArrayCtor.AsMember(spanType), arrayCreation.Syntax, optArgList: null);
CodeGen\EmitStackAllocInitializer.cs (1)
76var spanGetItem = spanGetItemDefinition.AsMember(readOnlySpan);
CodeGen\EmitStatement.cs (2)
1633var spanCharLengthMethod = spanTLengthMethod.AsMember((NamedTypeSymbol)keyType); 1658var spanCharLengthMethod = spanTIndexerMethod.AsMember((NamedTypeSymbol)keyType);
Compiler\MethodBodySynthesizer.cs (2)
257getOrCreateMethod = getOrCreateMethod.AsMember(fieldType); 275processHandlerMethod = 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))), 388system_Collections_Generic_EqualityComparer_T__get_Default.AsMember(constructedEqualityComparer)), 389system_Collections_Generic_EqualityComparer_T__GetHashCode.AsMember(constructedEqualityComparer), 432equalityComparer_get_Default.AsMember(constructedEqualityComparer)), 433equalityComparer_Equals.AsMember(constructedEqualityComparer),
FlowAnalysis\NullableWalker.cs (3)
6367var constructedMethod = wellKnownMethod.AsMember(constructedType); 10832valueProperty = getValue?.AsMember((NamedTypeSymbol)containingType)?.AssociatedSymbol; 11446? getResult.OriginalDefinition.AsMember(taskAwaiterType)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (19)
207F.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)
676MethodSymbol constructor = frame.Constructor.AsMember(frameType); 1042synthesizedMethod = synthesizedMethod.AsMember(constructedFrame);
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (1)
215var result = overload.AsMember(method.ContainingType);
Lowering\IteratorRewriter\IteratorRewriter.cs (3)
219var IEnumeratorOfElementType_get_Current = F.SpecialProperty(SpecialMember.System_Collections_Generic_IEnumerator_T__Current).GetMethod.AsMember(IEnumeratorOfElementType); 259var IEnumerableOfElementType_GetEnumerator = F.SpecialMethod(SpecialMember.System_Collections_Generic_IEnumerable_T__GetEnumerator).AsMember(IEnumerableOfElementType); 309F.New(stateMachineType.Constructor.AsMember(frameType), F.Literal(initialState))));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
1908return UnsafeGetSpecialTypeMethod(syntax, member, compilation, diagnostics).AsMember(nullableType2); 1916result = result.AsMember(nullableType2);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (15)
276var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_ReadOnlySpan_T__ctor_Array)).AsMember(spanType); 295collectionTypeKind == CollectionExpressionTypeKind.Span ? WellKnownMember.System_Span_T__ctor_Array : WellKnownMember.System_ReadOnlySpan_T__ctor_Array)!).AsMember(spanType); 312var listToArray = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ToArray)).AsMember((NamedTypeSymbol)list.Type); 661return _factory.Call(rewrittenSpreadExpression, listToArrayMethod.AsMember((NamedTypeSymbol)spreadExpression.Type!)); 671return _factory.Call(rewrittenSpreadExpression, toArrayMethod.AsMember((NamedTypeSymbol)rewrittenSpreadExpression.Type!)); 819asSpanMethod = spanCtorArray.AsMember(spanCtorArray.ContainingType.Construct(arrayType.ElementType)); 841asSpanMethod = immutableArrayAsSpanMethod.AsMember(namedType); 964var spreadLength = _factory.Call(spreadOperandAsSpan, getLengthMethod.AsMember((NamedTypeSymbol)spreadOperandAsSpan.Type!)); 965var targetSlice = _factory.Call(spanTemp, spanSliceMethod.AsMember((NamedTypeSymbol)spanTemp.Type!), indexTemp, spreadLength); 966sideEffects.Add(_factory.Call(spreadOperandAsSpan, copyToMethod.AsMember((NamedTypeSymbol)spreadOperandAsSpan.Type!), targetSlice)); 1013var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctorInt32)).AsMember(collectionType); 1037var constructor = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Collections_Generic_List_T__ctor)).AsMember(collectionType); 1063var spanGetItem = ((MethodSymbol)_factory.WellKnownMember(WellKnownMember.System_Span_T__get_Item)).AsMember((NamedTypeSymbol)spanTemp.Type); 1117var addMethod = _factory.WellKnownMethod(WellKnownMember.System_Collections_Generic_List_T__Add).AsMember(collectionType); 1118var addRangeMethod = _factory.WellKnownMethod(WellKnownMember.System_Collections_Generic_List_T__AddRange, isOptional: true)?.AsMember(collectionType);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
115result = new BoundObjectCreationExpression(node.Syntax, ctor.AsMember((NamedTypeSymbol)node.Type), utf8Bytes, _factory.Literal(0), _factory.Literal(length));
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
253getOrCreateMethod = getOrCreateMethod.AsMember(fieldType); 282invocationListAccessor = invocationListAccessor.AsMember(fieldType);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
244getItemOrSliceHelper = getItemOrSliceHelper.AsMember((NamedTypeSymbol)createSpan.ReturnType); 393getItemOrSliceHelper = getItemOrSliceHelper.AsMember((NamedTypeSymbol)createSpan.ReturnType);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
509readOnlySpanCtorRefParamChar = readOnlySpanCtorRefParamGeneric.AsMember(readOnlySpanOfChar);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
66MethodSymbol smallestConstructor = smallestCtor.AsMember(smallestType);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
643var callSiteFactoryMethod = callSiteFactoryGeneric.AsMember(callSiteType);
Lowering\MethodToClassRewriter.cs (1)
648.AsMember((NamedTypeSymbol)TypeMap.SubstituteType(method.ContainingType).AsTypeSymbolOnly())
Lowering\SyntheticBoundNodeFactory.cs (1)
1513return this.Call(arg, this.SpecialMethod(CodeAnalysis.SpecialMember.System_Nullable_T_get_Value).AsMember((NamedTypeSymbol)arg.Type));
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
787return ((MethodSymbol)member).AsMember(translatedType);
Symbols\Compilation_WellKnownMembers.cs (1)
75/// <see cref="MethodSymbol.AsMember"/> to construct an instantiation.
Symbols\MemberSymbolExtensions.cs (1)
274return ((MethodSymbol)s).AsMember(newOwner);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
910return retargetedDefinition.AsMember(retargetedType);
Symbols\SubstitutedEventSymbol.cs (2)
64return (object?)originalAddMethod == null ? null : originalAddMethod.AsMember(_containingType); 73return (object?)originalRemoveMethod == null ? null : originalRemoveMethod.AsMember(_containingType);
Symbols\SubstitutedPropertySymbol.cs (2)
91return (object)originalGetMethod == null ? null : originalGetMethod.AsMember(_containingType); 100return (object)originalSetMethod == null ? null : originalSetMethod.AsMember(_containingType);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (2)
761equalityComparer_get_Default.AsMember(constructedEqualityComparer)), 762equalityComparer_Equals.AsMember(constructedEqualityComparer),