24 overrides of RefKind
Microsoft.CodeAnalysis.CSharp (24)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
140public override RefKind RefKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
53public override RefKind RefKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (1)
38public override RefKind RefKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (1)
42public override RefKind RefKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
39public override RefKind RefKind
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (1)
42public override RefKind RefKind
Symbols\ErrorMethodSymbol.cs (1)
158public override RefKind RefKind
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
767public override RefKind RefKind { get; }
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
662public override RefKind RefKind => Signature.ReturnParam.RefKind;
Symbols\ReducedExtensionMethodSymbol.cs (1)
487public override RefKind RefKind
Symbols\SignatureOnlyMethodSymbol.cs (1)
75public override RefKind RefKind { get { return _refKind; } }
Symbols\Source\LambdaSymbol.cs (1)
145public override RefKind RefKind
Symbols\Source\LocalFunctionSymbol.cs (1)
237public override RefKind RefKind => _refKind;
Symbols\Source\SourceMemberMethodSymbol.cs (1)
1127public sealed override RefKind RefKind => this.flags.RefKind;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
163public override RefKind RefKind { get; }
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
115public override RefKind RefKind
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
204public override RefKind RefKind
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
96public sealed override RefKind RefKind
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
149public override RefKind RefKind
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
114public override RefKind RefKind
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
216public override RefKind RefKind
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
181public override RefKind RefKind
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
127public override RefKind RefKind
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
56public override RefKind RefKind
87 references to RefKind
Microsoft.CodeAnalysis.CSharp (87)
Binder\Binder.ValueChecks.cs (18)
53Method is { RefKind: not RefKind.None, ReturnType: { } returnType } && 1668if (RequiresVariable(valueKind) && methodSymbol.RefKind == RefKind.None) 1683if (RequiresAssignableVariable(valueKind) && methodSymbol.RefKind == RefKind.RefReadOnly) 3446if (methodSymbol.RefKind == RefKind.None) 3529if (methodSymbol.RefKind == RefKind.None) 3608conversion.Conversion.Method.RefKind == RefKind.None)); 3615unaryMethod.RefKind == RefKind.None)); 3622binaryMethod.RefKind == RefKind.None)); 3628logicalOperator.LogicalOperator.RefKind == RefKind.None)); 3635compoundMethod.RefKind == RefKind.None)); 3763if (methodSymbol.RefKind == RefKind.None) 3846if (methodSymbol.RefKind == RefKind.None) 3978conversion.Conversion.Method.RefKind == RefKind.None); 3985unaryMethod.RefKind == RefKind.None)); 3992binaryMethod.RefKind == RefKind.None)); 3998logicalOperator.LogicalOperator.RefKind == RefKind.None)); 4005compoundMethod.RefKind == RefKind.None)); 5772var methodRefKind = ((BoundCall)expression).Method.RefKind;
Binder\Binder_Conversions.cs (5)
2880if (delegateOrFuncPtrMethod.RefKind != method.RefKind) 2891{ RefKind: RefKind.None, ReturnsVoid: true } => method.ReturnsVoid, 2892{ RefKind: var destinationRefKind } => hasConversion( 2897sourceRefKind: method.RefKind,
Binder\Binder_Expressions.cs (2)
10198getMethod.RefKind == RefKind.None && 10802var returnRefKind = returnRefKindOverride ?? methodSymbol.RefKind;
Binder\Binder_Statements.cs (2)
1338!patternMethodSymbol.RefKind.IsManagedReference() || 2968refKind = symbol.RefKind;
Binder\ExecutableCodeBinder.cs (1)
136RefKind refKind = iterator.RefKind;
Binder\ForEachLoopBinder.cs (1)
866builder.CurrentPropertyGetter?.RefKind == (wellKnownSpan == WellKnownType.System_ReadOnlySpan_T ? RefKind.RefReadOnly : RefKind.Ref)) ||
Binder\InMethodBinder.cs (1)
127RefKind refKind = _methodSymbol.RefKind;
Binder\LockBinder.cs (1)
80if (enterScopeMethod is not { ReturnsVoid: false, RefKind: RefKind.None })
Binder\Semantics\Conversions\Conversions.cs (3)
258returnRefKind: delegateInvokeMethodOpt.RefKind, returnType: delegateInvokeMethodOpt.ReturnType, 364isMethodGroupConversion: true, returnRefKind: invokeMethodOpt?.RefKind, delegateOrFunctionPointerType: targetType); 393returnRefKind: delegateInvokeMethod.RefKind,
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1487if (invokeMethod.RefKind != refKind ||
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
882else if (method.RefKind != returnRefKind)
BoundTree\BoundExpressionExtensions.cs (1)
34return ((BoundCall)node).Method.RefKind;
BoundTree\UnboundLambda.cs (1)
645refKind = invokeMethod.RefKind;
CodeGen\CodeGenerator.cs (1)
169var slotConstraints = _method.RefKind == RefKind.None
CodeGen\EmitAddress.cs (1)
181var methodRefKind = call.Method.RefKind;
CodeGen\EmitExpression.cs (6)
1739var methodRefKind = call.Method.RefKind; 2220return ((BoundCall)receiver).Method.RefKind != RefKind.None; 2931Debug.Assert(left.Method.RefKind != RefKind.None); 3133Debug.Assert(((BoundCall)expression).Method.RefKind != RefKind.None); 4088if (useKind == UseKind.UsedAsValue && method.RefKind != RefKind.None) 4094Debug.Assert(method.RefKind != RefKind.None);
CodeGen\EmitStatement.cs (1)
873var unexpectedTemp = this.EmitAddress(expressionOpt, this._method.RefKind == RefKind.RefReadOnly ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
CodeGen\Optimizer.cs (1)
1057Debug.Assert(((BoundCall)lhs).Method.RefKind == RefKind.Ref, "only ref returning methods are assignable");
Compilation\CSharpCompilation.cs (1)
2221if (method.RefKind != RefKind.None)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
602method.RefKind.Equals(other.RefKind) &&
Emitter\Model\MethodReference.cs (1)
105return UnderlyingMethod.RefKind.IsManagedReference();
Emitter\Model\MethodSymbolAdapter.cs (1)
236return AdaptedMethodSymbol.RefKind.IsManagedReference();
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
488method.RefKind == RefKind.None &&
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
347else if (method.RefKind != RefKind.None)
Lowering\LocalRewriter\LocalRewriter.cs (1)
1087return ((BoundCall)expr).Method.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
699Debug.Assert(((BoundCall)originalLHS).Method.RefKind != RefKind.None);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
625Debug.Assert(call.Method.RefKind != RefKind.None);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
42refKind: baseMethod.RefKind,
Lowering\SyntheticBoundNodeFactory.cs (2)
561Debug.Assert(CurrentFunction.RefKind == RefKind.None); 566return new BoundReturnStatement(Syntax, CurrentFunction.RefKind, expression, @checked: false) { WasCompilerGenerated = true };
Symbols\Compilation_WellKnownMembers.cs (1)
1177return method.RefKind != RefKind.None;
Symbols\MethodSymbol.cs (4)
218return this.RefKind == RefKind.Ref; 229Debug.Assert(this.RefKind != RefKind.Out); 230return this.RefKind == RefKind.RefReadOnly; 1163AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDynamicAttribute(type.Type, type.CustomModifiers.Length + this.RefCustomModifiers.Length, this.RefKind));
Symbols\PublicModel\MethodSymbol.cs (1)
327RefKind IMethodSymbol.RefKind => _underlying.RefKind;
Symbols\ReducedExtensionMethodSymbol.cs (1)
489get { return _reducedFrom.RefKind; }
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1022method.RefKind,
Symbols\Source\CustomModifierUtils.cs (1)
43destinationMethod.RefKind != RefKind.None ? constructedSourceMethod.RefCustomModifiers : ImmutableArray<CustomModifier>.Empty;
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
29TypeWithAnnotations elementType = InMethodBinder.GetIteratorElementTypeFromReturnType(DeclaringCompilation, RefKind, ReturnType, errorLocation: null, diagnostics: null);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (5)
987if (overridingMethod.RefKind != overriddenMethod.RefKind) 1268overrideMethod.RefKind, 1278overrideMethod.RefKind == RefKind.Ref ? RefKind.Ref : RefKind.Out, 1391(method.RefKind is RefKind.Ref or RefKind.RefReadOnly))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1393checkAndReportManagedTypes(ReturnType, this.RefKind, returnTypeSyntax, isParam: false, diagnostics); 1524if (this.RefKind != RefKind.None)
Symbols\SymbolExtensions.cs (1)
500refKind = method.RefKind;
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
98get { return _interfaceMethod.RefKind; }
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
185return _overriddenAccessor.RefKind;
Symbols\TypeSymbol.cs (3)
1606interfaceMethod.RefKind, 2008interfaceMemberRefKind = method.RefKind; 2027hasRefReturnMismatch = ((MethodSymbol)closestMismatch).RefKind != interfaceMemberRefKind;
Symbols\VarianceSafety.cs (2)
163requireInputSafety: method.RefKind != RefKind.None, 199requireInputSafety: hasSetter || !(property.GetMethod?.RefKind == RefKind.None),
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
60return UnderlyingMethod.RefKind;