968 references to None
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
796if ((symbol.RefKind == RefKind.None) == parameterInfo.IsRefOrOut)
DocumentationCommentId.cs (2)
458if (p.RefKind != RefKind.None) 1358if ((symbol.RefKind == RefKind.None) == parameterInfo.IsRefOrOut)
Operations\ControlFlowGraphBuilder.cs (1)
4566return new SimpleAssignmentOperation(isRef: local.RefKind != RefKind.None,
Operations\OperationExtensions.cs (1)
322return RefKind.None;
Symbols\RefKind.cs (1)
76case RefKind.None: return string.Empty;
Microsoft.CodeAnalysis.CodeStyle (8)
ISymbolExtensions.cs (1)
434if (symbol is IMethodSymbol method && method.Parameters.All(p => p.RefKind == RefKind.None))
OperationExtensions.cs (1)
227return containingMethod?.RefKind ?? RefKind.None;
SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
796if ((symbol.RefKind == RefKind.None) == parameterInfo.IsRefOrOut)
SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (2)
85: (rk1 == RefKind.None) == (rk2 == RefKind.None);
UseCompoundAssignmentUtilities.cs (1)
133if (property.RefKind == RefKind.None)
UseConditionalExpressionForReturnHelpers.cs (2)
81syntaxFacts, anyReturn.GetRefKind(containingSymbol) != RefKind.None, 122isRef = anyReturn.GetRefKind(containingSymbol) != RefKind.None;
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
CodeGenerationConstructorSymbol.cs (1)
30refKind: RefKind.None,
CodeGenerationConversionSymbol.cs (1)
34refKind: RefKind.None,
CodeGenerationDestructorSymbol.cs (1)
21refKind: RefKind.None,
CodeGenerationFieldSymbol.cs (1)
92public RefKind RefKind => RefKind.None;
CodeGenerationOperatorSymbol.cs (1)
35refKind: RefKind.None,
CodeGenerationSymbolFactory.cs (2)
269=> CreateParameterSymbol(RefKind.None, type, name); 394refKind: RefKind.None,
Microsoft.CodeAnalysis.CSharp (597)
Binder\Binder.QueryUnboundLambdaState.cs (1)
50public override RefKind RefKind(int index) { return Microsoft.CodeAnalysis.RefKind.None; }
Binder\Binder.ValueChecks.cs (43)
840(localSymbol.RefKind == RefKind.None && !localSymbol.IsWritableVariable)) 848if (localSymbol.RefKind == RefKind.None) 880if (localSymbol.RefKind == RefKind.None) 928else if (parameterSymbol.RefKind == RefKind.None && RequiresRefAssignableVariable(valueKind)) 934Debug.Assert(parameterSymbol.RefKind != RefKind.None || !RequiresRefAssignableVariable(valueKind)); 938if (parameterSymbol.RefKind == RefKind.None && 942Debug.Assert(backingField.RefKind == RefKind.None); 947Debug.Assert(backingField.RefKind == RefKind.None); 1049{ RefKind: RefKind.None } => CurrentMethodScope, 1085Debug.Assert(parameterSymbol.RefKind == RefKind.None || isRefScoped || refSafeToEscape == ReturnOnlyScope); 1135if ((fieldSymbol.RefKind == RefKind.None ? RequiresAssignableVariable(valueKind) : RequiresRefAssignableVariable(valueKind)) && 1147case RefKind.None: 1172case RefKind.None: 1275if (fieldSymbol.RefKind != RefKind.None) 1299if (fieldSymbol.RefKind != RefKind.None) 1435if (RequiresVariable(valueKind) && methodSymbol.RefKind == RefKind.None) 1481propertySymbol.RefKind == RefKind.None) 1511var requiresSet = RequiresAssignableVariable(valueKind) && propertySymbol.RefKind == RefKind.None; 1580var requiresGet = !RequiresAssignmentOnly(valueKind) || propertySymbol.RefKind != RefKind.None; 1803var argEscape = effectiveRefKind != RefKind.None && isRefEscape ? 1863|| (param is null or { RefKind: not RefKind.None, Type.IsRefLikeType: true } && isArgumentRefEscape == isRefEscape)) 1892return method is { RefKind: not RefKind.None, ReturnType.IsRefLikeType: true }; 1964var valid = effectiveRefKind != RefKind.None && isRefEscape ? 2025|| (param is null or { RefKind: not RefKind.None, Type.IsRefLikeType: true } && isArgumentRefEscape == isRefEscape)) 2133var refKind = parameter?.RefKind ?? RefKind.None; 2138if (refKind == RefKind.None && 2170return new EscapeArgument(parameter: null, receiver, RefKind.None); 2173var refKind = RefKind.None; 2194var refKind = argRefKindsOpt.IsDefault ? RefKind.None : argRefKindsOpt[argIndex]; 2321if (refKind != RefKind.None) 2341if (parameter.RefKind != RefKind.None && GetParameterRefEscapeLevel(parameter) is { } refEscapeLevel) 2821Debug.Assert(field.RefKind == RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind)); 3014if (methodSymbol.RefKind == RefKind.None) 3035if (methodSymbol.RefKind == RefKind.None) 3093if (methodSymbol.RefKind == RefKind.None) 3259if (methodSymbol.RefKind == RefKind.None) 3284if (indexerSymbol.RefKind == RefKind.None) 3314if (indexerSymbol.RefKind == RefKind.None) 3339if (methodSymbol.RefKind == RefKind.None) 3367if (signature.RefKind == RefKind.None) 3390if (propertySymbol.RefKind == RefKind.None) 4636return !((CodeGenerator.IsStackLocal(local, stackLocalsOpt) && local.RefKind == RefKind.None) || 4758Debug.Assert(field.RefKind == RefKind.None);
Binder\Binder_AnonymousTypes.cs (1)
96RefKind.None,
Binder\Binder_Attributes.cs (2)
471BindArgumentExpression(diagnostics, argument.Expression, RefKind.None, allowArglist: false), 473refKind: RefKind.None);
Binder\Binder_Conversions.cs (2)
1348{ RefKind: RefKind.None, ReturnsVoid: true } => method.ReturnsVoid, 1391if (sourceRefKind != RefKind.None)
Binder\Binder_Crefs.cs (2)
794refKind: RefKind.None, 811refKind: RefKind.None,
Binder\Binder_Expressions.cs (21)
1779if (refKind != RefKind.None || type.IsRefLikeType) 1942(parameter.RefKind != RefKind.None || parameter.Type.IsRefLikeType) && 1947else if (primaryCtor is { ThisParameter.RefKind: not RefKind.None } && 2284if ((object)thisSymbol != null && thisSymbol.ContainingSymbol != ContainingMemberOrLambda && thisSymbol.RefKind != RefKind.None) 2836RefKind refKind = origRefKind == RefKind.None || RefMustBeObeyed(isDelegateCreation, argumentSyntax) ? origRefKind : RefKind.None; 2849if (!hadError && isDelegateCreation && origRefKind != RefKind.None && result.Arguments.Count == 1) 3075if (refKind != RefKind.None) 3085result.RefKinds.Add(RefKind.None); 3136refKind == RefKind.None ? 7142extensionMethodArguments.RefKinds.Add(RefKind.None); 7523fieldSymbol.RefKind != RefKind.None) 8230if (refKind != RefKind.None) 8675original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 8732original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 8733original.Parameters[1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 8832getMethod.RefKind == RefKind.None && 9213if (returnsVoid && returnRefKind != RefKind.None) 9227returnRefKind == RefKind.None && 9229(parameterRefKinds.IsDefault || parameterRefKinds.All(refKind => refKind == RefKind.None)) && 9263parameterRefKinds.IsDefault ? RefKind.None : parameterRefKinds[i],
Binder\Binder_InterpolatedString.cs (3)
570refKindsBuilder.Add(RefKind.None); 571refKindsBuilder.Add(RefKind.None); 961refKind = RefKind.None;
Binder\Binder_Invocation.cs (4)
221else if (analyzedArguments.RefKind(i) == RefKind.None) 228case RefKind.None: 1073Debug.Assert(analyzedArguments.RefKind(0) == RefKind.None); 1331argumentRefKindsBuilder.Add(RefKind.None);
Binder\Binder_Lambda.cs (3)
48RefKind returnRefKind = RefKind.None; 170var refKind = RefKind.None; 212if (refKindsBuilder.Any(r => r != RefKind.None))
Binder\Binder_Operators.cs (2)
2601if (parameterSymbol.RefKind != RefKind.None) 2632return localSymbol.RefKind != RefKind.None;
Binder\Binder_Query.cs (3)
695return lambdaBodyBinder.CreateBlockFromExpression(node, ImmutableArray<LocalSymbol>.Empty, RefKind.None, construction, null, d); 775return this.CreateBlockFromExpression(expression, locals, RefKind.None, result, expression, diagnostics); 817new AnonymousTypeField(fieldName, fieldValue.Syntax.Location, TypeWithAnnotations.Create(TypeOrError(fieldValue)), RefKind.None, ScopedKind.None);
Binder\Binder_Statements.cs (21)
918RefKind expressionRefKind = RefKind.None; 920if (variableRefKind == RefKind.None) 1001if (localSymbol.RefKind != RefKind.None) 1067localSymbol.RefKind != RefKind.None ? ConversionForAssignmentFlags.RefAssignment : ConversionForAssignmentFlags.None); 2111if (delegateRefKind != RefKind.None) 2165if (delegateRefKind == RefKind.None) 2882refKind = RefKind.None; 2888var refKind = RefKind.None; 2917if (refKind != RefKind.None) 2929else if ((object)retType != null && (refKind != RefKind.None) != (sigRefKind != RefKind.None)) 2931var errorCode = refKind != RefKind.None 3039Debug.Assert(returnRefKind == RefKind.None); 3061if (returnRefKind != RefKind.None) 3352if (IsInAsyncMethod() && refKind != RefKind.None) 3361if ((refKind != RefKind.None) != (returnRefKind != RefKind.None) && expression.Kind != BoundKind.ThrowExpression) 3363var errorCode = refKind != RefKind.None 3368statement = new BoundReturnStatement(syntax, RefKind.None, expression, @checked: CheckOverflowAtRuntime) { WasCompilerGenerated = true }; 3501return bodyBinder.CreateBlockFromExpression(body, bodyBinder.GetDeclaredLocalsForScope(body), RefKind.None, expression, body, diagnostics); 3507if (refKind != RefKind.None)
Binder\ExecutableCodeBinder.cs (2)
112if (parameter.RefKind != RefKind.None) 141if (refKind != RefKind.None)
Binder\ForEachLoopBinder.cs (2)
308if (local.RefKind != RefKind.None) 321case RefKind.None:
Binder\InMethodBinder.cs (2)
148if (refKind == RefKind.None && returnType.Kind == SymbolKind.NamedType) 179if (refKind == RefKind.None && returnType.Kind == SymbolKind.NamedType)
Binder\RefSafetyAnalysis.cs (5)
258ValidateEscape(value, CallingMethodScope, isByRef: field.RefKind != RefKind.None, _diagnostics); 436Debug.Assert(localSymbol.RefKind == RefKind.None || 450if (localSymbol.RefKind != RefKind.None) 467ValidateEscape(expr, ReturnOnlyScope, node.RefKind != RefKind.None, _diagnostics); 861AddLocalScopes(local, refEscapeScope: local.RefKind == RefKind.None ? _localScopeDepth : collectionEscape, valEscapeScope: collectionEscape);
Binder\Semantics\Conversions\ConversionsBase.cs (2)
1451if (delegateParameters[p].RefKind != RefKind.None) 3190case RefKind.None:
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
1251if (op1.LeftRefKind == RefKind.None && op2.LeftRefKind == RefKind.In) 1255else if (op2.LeftRefKind == RefKind.None && op1.LeftRefKind == RefKind.In) 1264if (op1.RightRefKind == RefKind.None && op2.RightRefKind == RefKind.In) 1275else if (op2.RightRefKind == RefKind.None && op1.RightRefKind == RefKind.In)
Binder\Semantics\Operators\BinaryOperatorSignature.cs (2)
108return RefKind.None; 128return RefKind.None;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
227if (op1.RefKind == RefKind.None && op2.RefKind == RefKind.In) 231else if (op2.RefKind == RefKind.None && op1.RefKind == RefKind.In)
Binder\Semantics\Operators\UnaryOperatorSignature.cs (1)
62return RefKind.None;
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (2)
78return RefKinds.Count > 0 ? RefKinds[i] : Microsoft.CodeAnalysis.RefKind.None; 101if ((object?)argument.Type != null && argument.Type.IsDynamic() && (!hasRefKinds || RefKinds[i] == Microsoft.CodeAnalysis.RefKind.None))
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
425return _formalParameterRefKinds.IsDefault ? RefKind.None : _formalParameterRefKinds[index]; 2227if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 2237if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None) 2577if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 2587if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (20)
644else if (returnRefKind == RefKind.None) 2165if (p1.RefKind == RefKind.None && isAcceptableRefMismatch(p2.RefKind, isInterpolatedStringHandlerConversion)) 2176else if (p2.RefKind == RefKind.None && isAcceptableRefMismatch(p1.RefKind, isInterpolatedStringHandlerConversion)) 2400Debug.Assert(refKind1 == RefKind.None || refKind1 == RefKind.Ref); 2401Debug.Assert(refKind2 == RefKind.None || refKind2 == RefKind.Ref); 2405if (refKind1 == RefKind.None) 3160RefKind argRefKind = hasAnyRefArg ? argumentRefKinds[arg] : RefKind.None; 3165if (paramRefKind != RefKind.None) 3167refs = ArrayBuilder<RefKind>.GetInstance(arg, RefKind.None); 3193if (!isMethodGroupConversion && argRefKind == RefKind.None && paramRefKind == RefKind.In) 3195return RefKind.None; 3201if (allowRefOmittedArguments && paramRefKind == RefKind.Ref && argRefKind == RefKind.None && !binder.InAttributeArgument) 3204return RefKind.None; 3249var argRefKind = hasAnyRefArg ? argumentRefKinds[arg] : RefKind.None; 3253if (paramRefKind != RefKind.None) 3662RefKind parameterRefKind = parameters.ParameterRefKinds.IsDefault ? RefKind.None : parameters.ParameterRefKinds[argumentPosition]; 3667Debug.Assert(argumentRefKind == RefKind.None); 3773(argRefKind == RefKind.None && argument.HasDynamicType()))) 3795Debug.Assert(argRefKind != RefKind.None); 3801if (argRefKind == RefKind.None || hasInterpolatedStringRefMismatch)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (4)
1094if (parameter.RefKind != RefKind.None) 1159Debug.Assert(refArg == RefKind.None); 1213else if (refArg != refParameter && !(refArg == RefKind.None && refParameter == RefKind.In)) 1215if (refParameter == RefKind.None || refParameter == RefKind.In)
BoundTree\BoundExpressionExtensions.cs (3)
48return RefKind.None; 54EventSymbol => RefKind.None, 59return RefKind.None;
BoundTree\UnboundLambda.cs (8)
177parameterRefKinds.IsDefault ? Enumerable.Repeat(RefKind.None, parameterTypes.Length).ToImmutableArray() : parameterRefKinds, 207RefKind refKind = RefKind.None; 211if (rk != RefKind.None) 622refKind = CodeAnalysis.RefKind.None; 759refKind == CodeAnalysis.RefKind.None && 1175refKind = CodeAnalysis.RefKind.None; 1501return _parameterRefKinds.IsDefault ? Microsoft.CodeAnalysis.RefKind.None : _parameterRefKinds[index]; 1536statements[0] is BoundReturnStatement { RefKind: Microsoft.CodeAnalysis.RefKind.None, ExpressionOpt: BoundExpression expr })
CodeGen\CodeGenerator.cs (1)
169var slotConstraints = _method.RefKind == RefKind.None
CodeGen\EmitAddress.cs (5)
38Debug.Assert(((BoundDup)expression).RefKind != RefKind.None, "taking address of a stack value?"); 271if (local.RefKind != RefKind.None) 477if (parameterSymbol.RefKind == RefKind.None) 551field.RefKind == RefKind.None ? 555_builder.EmitOpCode(field.RefKind == RefKind.None ? ILOpCode.Ldflda : ILOpCode.Ldfld);
CodeGen\EmitExpression.cs (33)
698RefKind refKind = expression.ArgumentRefKindsOpt.IsDefaultOrEmpty ? RefKind.None : expression.ArgumentRefKindsOpt[i]; 707case RefKind.None: 765if (expression.RefKind == RefKind.None) 936Debug.Assert(parameters.All(p => p.RefKind == RefKind.None) || !argRefKindsOpt.IsDefault, "there are nontrivial parameters, so we must have argRefKinds"); 974argRefKind = RefKind.None; 1092if (!field.IsVolatile && !field.IsStatic && fieldAccess.ReceiverOpt.Type.IsVerifierValue() && field.RefKind == RefKind.None) 1104if (field.RefKind != RefKind.None) 1248return ((BoundParameter)receiver).ParameterSymbol.RefKind != RefKind.None; 1252return ((BoundLocal)receiver).LocalSymbol.RefKind != RefKind.None; 1261if (field.IsStatic || field.RefKind != RefKind.None) 1352bool isRefLocal = local.LocalSymbol.RefKind != RefKind.None; 1384if (parameter.ParameterSymbol.RefKind != RefKind.None) 1994return ((BoundLocal)receiver).LocalSymbol.RefKind != RefKind.None; 1997return ((BoundParameter)receiver).ParameterSymbol.RefKind != RefKind.None; 2000return ((BoundCall)receiver).Method.RefKind != RefKind.None; 2003return ((BoundFunctionPointerInvocation)receiver).FunctionPointer.Signature.RefKind != RefKind.None; 2006return ((BoundDup)receiver).RefKind != RefKind.None; 2416if (System.Linq.ImmutableArrayExtensions.All(ctor.Parameters, p => p.RefKind == RefKind.None) && 2540return ((BoundParameter)left).ParameterSymbol.RefKind == RefKind.None; 2545return ((BoundLocal)left).LocalSymbol.RefKind == RefKind.None; 2565if (left.FieldSymbol.RefKind != RefKind.None && 2582if (left.ParameterSymbol.RefKind != RefKind.None && 2614if (left.LocalSymbol.RefKind != RefKind.None && !assignmentOperator.IsRef) 2713Debug.Assert(left.Method.RefKind != RefKind.None); 2724Debug.Assert(left.FunctionPointer.Signature.RefKind != RefKind.None); 2859if (local.LocalSymbol.RefKind != RefKind.None && !assignment.IsRef) 2892Debug.Assert(((BoundDup)expression).RefKind != RefKind.None); 2915Debug.Assert(((BoundCall)expression).Method.RefKind != RefKind.None); 2920Debug.Assert(((BoundFunctionPointerInvocation)expression).FunctionPointer.Signature.RefKind != RefKind.None); 3064if (field.RefKind != RefKind.None && !refAssign) 3079if (parameter.ParameterSymbol.RefKind != RefKind.None && !refAssign) 3814if (useKind == UseKind.UsedAsValue && method.RefKind != RefKind.None) 3820Debug.Assert(method.RefKind != RefKind.None);
CodeGen\EmitStatement.cs (9)
724Debug.Assert(local.RefKind == RefKind.None || local.SynthesizedKind.IsLongLived(), 840if (boundReturnStatement.RefKind == RefKind.None) 1122Debug.Assert(exceptionSourceLocal.LocalSymbol.RefKind == RefKind.None); 1134Debug.Assert(left.FieldSymbol.RefKind == RefKind.None); 1258if (local.RefKind == RefKind.None && !IsStackLocal(local)) 1267if (parameter.ParameterSymbol.RefKind == RefKind.None) 1736CSharpCompilation.DynamicTransformsEncoder.Encode(local.Type, RefKind.None, 0) : 1766Debug.Assert(local.RefKind == RefKind.None); 1782(local.RefKind != RefKind.None ? LocalSlotConstraints.ByRef : LocalSlotConstraints.None);
CodeGen\Optimizer.cs (13)
857if (node.LocalSymbol.RefKind != RefKind.None) 877if (node.LocalSymbol.RefKind != RefKind.None) 1030(lhs.Kind is BoundKind.Local or BoundKind.Parameter or BoundKind.FieldAccess && lhs.GetRefKind() != RefKind.None), 1040if (((BoundParameter)lhs).ParameterSymbol.RefKind != RefKind.None) 1048if (((BoundLocal)lhs).LocalSymbol.RefKind != RefKind.None) 1157if (unwrappedSequence is BoundLocal { LocalSymbol: { RefKind: not RefKind.None } localSymbol }) 1207ExprContext context = (argRefKind == RefKind.None) ? ExprContext.Value : ExprContext.Address; 1233RefKind refKind = argRefKindsOpt.IsDefaultOrEmpty ? RefKind.None : argRefKindsOpt[i]; 1361if (localSym.RefKind == RefKind.None) 1807Debug.Assert(local.RefKind == RefKind.None, "cannot take a ref of a ref"); 1868return top.Item2 == (local.RefKind == RefKind.None ? ExprContext.Value : ExprContext.Address) && 2095var isIndirectLocalStore = left.LocalSymbol.RefKind != RefKind.None && !node.IsRef; 2305get { return RefKind.None; }
Compilation\CSharpCompilation.cs (2)
2048if (method.RefKind != RefKind.None) 3902fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.None));
Compiler\MethodBodySynthesizer.cs (4)
192statement = new BoundReturnStatement(accessor.SyntaxNode, RefKind.None, fieldAccess, @checked: false); 308BoundStatement returnStatement = BoundReturnStatement.Synthesized(syntax, RefKind.None, processHandlerCall); 318BoundStatement returnStatement = new BoundReturnStatement(syntax, RefKind.None, expressionOpt: null, @checked: false); 355refKind: RefKind.None,
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
248if (symbol.RefKind != RefKind.None)
Emitter\Model\FieldSymbolAdapter.cs (1)
53bool Cci.IFieldReference.IsByReference => AdaptedFieldSymbol.RefKind != RefKind.None;
Emitter\Model\ParameterSymbolAdapter.cs (1)
38return AdaptedParameterSymbol.RefKind != RefKind.None;
Emitter\Model\ParameterTypeInformation.cs (1)
39return _underlyingParameter.RefKind != RefKind.None;
Emitter\Model\PEModuleBuilder.cs (1)
1285!optArgList.ArgumentRefKindsOpt.IsDefaultOrEmpty && optArgList.ArgumentRefKindsOpt[i] != RefKind.None,
Emitter\Model\SpecializedFieldReference.cs (1)
80bool Cci.IFieldReference.IsByReference => _underlyingField.RefKind != RefKind.None;
FlowAnalysis\AbstractFlowPass.cs (12)
1237VisitRvalue(node.InitializerOpt, isKnownToBeAnLvalue: node.LocalSymbol.RefKind != RefKind.None); 1240if (node.LocalSymbol.RefKind != RefKind.None) 1444VisitRvalue(arguments[i], isKnownToBeAnLvalue: refKind != RefKind.None); 1462if (refKind != RefKind.None) 1471return refKindsOpt.IsDefault || refKindsOpt.Length <= index ? RefKind.None : refKindsOpt[index]; 1885VisitRvalue(node.ExpressionOpt, isKnownToBeAnLvalue: node.RefKind != RefKind.None); 1888if (node.RefKind != RefKind.None) 1966if (property.RefKind == RefKind.None) 2021if (property.RefKind == RefKind.None) 2040if (property.RefKind == RefKind.None) 2613if (property.RefKind == RefKind.None) 3517property.RefKind == RefKind.None)
FlowAnalysis\DataFlowsOutWalker.cs (1)
233((param.RefKind != RefKind.None && !param.IsImplicitlyDeclared && !RegionContains(param.Locations[0].SourceSpan)) ||
FlowAnalysis\DefiniteAssignment.cs (3)
1500if (local.LocalSymbol.RefKind != RefKind.None && !isRef) 1831if (parameter.RefKind != RefKind.None) 2419if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type)
FlowAnalysis\FlowAnalysisPass.cs (3)
85var newStatements = block.Statements.Add(new BoundReturnStatement(trailingExpression.Syntax, RefKind.None, trailingExpression, @checked: false)); 120if (field.RefKind == RefKind.None) 182: BoundReturnStatement.Synthesized(syntax, RefKind.None, null);
FlowAnalysis\NullableWalker.cs (11)
2316return AreParameterAnnotationsCompatible(RefKind.None, overriddenType, overriddenAnnotations, overridingType, overridingAnnotations, forRef: true) && 2320if (refKind == RefKind.None || refKind == RefKind.In) 2817if (node.RefKind == RefKind.None && 2826if (node.RefKind == RefKind.None) 6506case RefKind.None: 6567case RefKind.None: 6702case RefKind.None: 6956if (refKind == RefKind.None) 9203return expr.GetRefKind() == RefKind.None; 9206return kind == RefKind.None; 11079TypeWithAnnotations elementType = InMethodBinder.GetIteratorElementTypeFromReturnType(compilation, RefKind.None,
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
59public override RefKind RefKind => RefKind.None;
FlowAnalysis\ReadWriteWalker.cs (2)
87if (p.RefKind != RefKind.None) _readOutside.Add(p); 95if ((object)thisParameter != null && thisParameter.RefKind != RefKind.None)
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
322unpendReturn = new BoundReturnStatement(_F.Syntax, RefKind.None, pendingValue, @checked: false);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
488method.RefKind == RefKind.None &&
Lowering\ClosureConversion\ClosureConversion.cs (2)
554new BoundReturnStatement(syntax, RefKind.None, null, @checked: false)); 907refkindsBuilder.AddMany(RefKind.None, arguments.Length);
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
119public override RefKind RefKind => RefKind.None;
Lowering\DiagnosticsPass_ExpressionTrees.cs (3)
336else if (method.RefKind != RefKind.None) 497if (_inExpressionLambda && property.RefKind != RefKind.None) 532if (p.RefKind != RefKind.None && p.Locations.Length != 0)
Lowering\DiagnosticsPass_Warnings.cs (3)
28if (argumentRefKindsOpt[i] != RefKind.None) 244if (method.Parameters[i].RefKind != RefKind.None && (argumentRefKindsOpt.IsDefault || argumentRefKindsOpt[i] == RefKind.None)) return true;
Lowering\Extensions.cs (1)
25return RefKind.None;
Lowering\InitializerRewriter.cs (2)
68boundStatements.Add(new BoundReturnStatement(lastStatement.Syntax, RefKind.None, trailingExpression, @checked: false)); 106isRef: field.RefKind != RefKind.None)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
450Debug.Assert(parameter.RefKind == RefKind.None);
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
28SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 0, RefKind.None, GeneratedNames.MakeStateMachineStateFieldName()));
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
142get { return RefKind.None; }
Lowering\LocalRewriter\LocalRewriter.cs (3)
960return ((BoundCall)expr).Method.RefKind != RefKind.None; 963return ((BoundPropertyAccess)expr).PropertySymbol.RefKind != RefKind.None; 966return ((BoundIndexerAccess)expr).Indexer.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
520&& loweredInput.GetRefKind() == RefKind.None &&
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
225Debug.Assert(!isRef || rewrittenLeft.GetRefKind() != RefKind.None);
Lowering\LocalRewriter\LocalRewriter_Call.cs (14)
328return kind != RefKind.None; 457refKind = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.Kind == SymbolKind.TypeParameter ? RefKind.Ref : RefKind.None; 463if (refKind == RefKind.None && 836ArrayBuilder<RefKind> refKinds = ArrayBuilder<RefKind>.GetInstance(parameters.Length, RefKind.None); 901var argRefKind = argumentRefKindsOpt.IsDefault ? RefKind.None : argumentRefKindsOpt[i]; 903refKindsBuilder[i] = argRefKind == RefKind.None ? paramRefKind : RefKindExtensions.StrictIn; 907var argRefKind = argumentRefKindsOpt.IsDefault ? RefKind.None : argumentRefKindsOpt[i]; 908if (argRefKind == RefKind.None) 940refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(parameters.Length, fillWithValue: RefKind.None); 1045if (refKind != RefKind.None) 1127Debug.Assert(argRefKind == RefKind.None || argRefKind == RefKind.In); 1128argRefKind = argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn; 1493if (argRefKind != RefKind.None || paramRefKind != RefKind.Ref) 1508Debug.Assert(localRefKind == RefKind.None);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (12)
204var receiverTemp = _factory.StoreToTemp(rewrittenReceiver, out assignmentToTemp, refKind: variableRepresentsLocation ? RefKind.Ref : RefKind.None); 331ArrayBuilder<RefKind> refKinds = ArrayBuilder<RefKind>.GetInstance(parameters.Length, RefKind.None); 418Debug.Assert(implicitIndexerAccess.IndexerOrSliceAccess.GetRefKind() == RefKind.None); 518var temp = _factory.StoreToTemp(VisitExpression(arguments[i]), out assignmentToTemp, indexerAccess.ArgumentRefKindsOpt.RefKinds(i) != RefKind.None ? RefKind.Ref : RefKind.None); 589if (propertyAccess.PropertySymbol.RefKind == RefKind.None) 604if (indexerAccess.GetRefKind() == RefKind.None) 617if (implicitIndexerAccess.GetRefKind() == RefKind.None) 687Debug.Assert(((BoundCall)originalLHS).Method.RefKind != RefKind.None); 691Debug.Assert(((BoundFunctionPointerInvocation)originalLHS).FunctionPointer.Signature.RefKind != RefKind.None); 839return localsMayBeAssignedOrCaptured || ((BoundParameter)expression).ParameterSymbol.RefKind != RefKind.None; 842return localsMayBeAssignedOrCaptured || ((BoundLocal)expression).LocalSymbol.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (2)
168case BoundLocal { LocalSymbol: { RefKind: RefKind.None } localSymbol }: 171case BoundParameter { ParameterSymbol: { RefKind: RefKind.None } parameterSymbol }:
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
36if (pinnedTemp.RefKind == RefKind.None)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (4)
117if (isLeftOfAssignment && indexer.RefKind == RefKind.None) 272receiver.Type.IsReferenceType ? RefKind.None : RefKind.Ref); 336if (isLeftOfAssignment && indexerAccess.GetRefKind() == RefKind.None) 580receiver.Type.IsReferenceType ? RefKind.None : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
148.All(p => p.RefKind == RefKind.None || p.RefKind == RefKind.In)); 170var builder = ArrayBuilder<RefKind>.GetInstance(addMethod.Parameters.Length, RefKind.None);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
52if (isLeftOfAssignment && propertySymbol.RefKind == RefKind.None)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
95Debug.Assert(construction.ArgumentRefKindsOpt[i] == RefKind.None);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
485return ((BoundLocal)expression).LocalSymbol.RefKind != RefKind.None; 489return ((BoundParameter)expression).ParameterSymbol.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
500Debug.Assert(method.Parameters.AsSpan()[1..].All(assertParametersAreOptional, (p, assertOptional) => (p.IsOptional || p.IsParams || !assertOptional) && p.RefKind == RefKind.None)); 501Debug.Assert(method.ParameterRefKinds.IsDefaultOrEmpty || method.ParameterRefKinds[0] is RefKind.In or RefKind.None);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (22)
111return MakeDynamicOperation(binderConstruction, null, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), null, resultType); 147return MakeDynamicOperation(binderConstruction, null, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), null, resultType); 190return MakeDynamicOperation(binderConstruction, null, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), null, resultType); 228receiverRefKind = RefKind.None; 292return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), loweredHandler, resultType); 329return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, refKinds, null, resultType); 356return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, refKinds, null, type); 391return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), null, resultType); 432return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, default(ImmutableArray<RefKind>), loweredRight, AssemblySymbol.DynamicType); 458return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, loweredArguments, refKinds, null, resultType); 516return MakeDynamicOperation(binderConstruction, loweredReceiver, RefKind.None, ImmutableArray<BoundExpression>.Empty, default(ImmutableArray<RefKind>), null, resultType); 547return RefKind.None; 570return RefKind.None; 579RefKind receiverRefKind = RefKind.None, 586Debug.Assert(!receiverIsStaticType || receiverRefKind == RefKind.None); 601refKinds.IsDefault ? RefKind.None : refKinds[i], 607infos[j++] = GetArgumentInfo(argumentInfoFactory, loweredRight, NoName, RefKind.None, isStaticType: false); 751bool hasByRefs = receiverRefKind != RefKind.None || !refKinds.IsDefaultOrEmpty; 791byRefs[j++] = RefKind.None; 806static RefKind getRefKind(RefKind refKind) => refKind == RefKind.None ? RefKind.None : RefKind.Ref; 828Debug.Assert(refKind == RefKind.None || refKind == RefKind.Ref || refKind == RefKind.Out, "unexpected refKind in dynamic");
Lowering\MethodToClassRewriter.cs (1)
484if (leftLocal.LocalSymbol.RefKind != RefKind.None &&
Lowering\SpillSequenceSpiller.cs (21)
306RefKind refKind = RefKind.None, 318Debug.Assert(refKind == RefKind.None); 325Debug.Assert(refKind == RefKind.None); 338if (refKind != RefKind.None) 381if (refKind != RefKind.None || expression.Type.IsReferenceType) 389if (refKind != RefKind.None) 398if (local.LocalSymbol.SynthesizedKind == SynthesizedLocalKind.Spill || refKind != RefKind.None) 411if (refKind != RefKind.None || fieldSymbol.IsReadOnly) 418if (refKind == RefKind.None) goto default; 420var receiver = Spill(builder, field.ReceiverOpt, fieldSymbol.ContainingType.IsValueType ? refKind : RefKind.None); 479Left: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.None } referenceTypeClone }, 483Value: BoundLocal { LocalSymbol: { SynthesizedKind: SynthesizedLocalKind.LoweringTemp, RefKind: RefKind.None } } referenceTypeReceiver 563var refKind = refKinds.IsDefault ? RefKind.None : refKinds[i]; 821expression = Spill(leftBuilder, expression, RefKind.None); 868expression = Spill(leftBuilder, expression, RefKind.None); 963Debug.Assert(refKind == RefKind.None || !receiver.Type.IsReferenceType); 967if (refKind != RefKind.None && 1002var result = RefKind.None; 1188if (receiver.Type.IsReferenceType || receiver.Type.IsValueType || receiverRefKind == RefKind.None) 1191receiver = Spill(receiverBuilder, receiver, RefKind.None); 1210var clone = _F.SynthesizedLocal(receiver.Type, _F.Syntax, refKind: RefKind.None, kind: SynthesizedLocalKind.Spill);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
225Debug.Assert(parameter.IsThis || parameter.RefKind == RefKind.None);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (12)
308if (local.RefKind != RefKind.None) 555BoundExpression expression = HoistExpression(array.Expression, awaitSyntaxOpt, syntaxOffset, RefKind.None, sideEffects, hoistedFields, ref needsSacrificialEvaluation); 559indices.Add(HoistExpression(index, awaitSyntaxOpt, syntaxOffset, RefKind.None, sideEffects, hoistedFields, ref needsSacrificialEvaluation)); 572if (refKind != RefKind.None || field.FieldSymbol.IsReadOnly) return expr; 576if (refKind == RefKind.None) 584isFieldOfStruct ? refKind : RefKind.None, sideEffects, hoistedFields, ref needsSacrificialEvaluation); 606if (refKind != RefKind.None && refKind != RefKind.In) 608Debug.Assert(call.Method.RefKind != RefKind.None); 612refKind = RefKind.None; 623if (refKind != RefKind.None && refKind != RefKind.RefReadOnly) 629refKind = RefKind.None; 638if (refKind != RefKind.None)
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
62public override RefKind RefKind => RefKind.None;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
169if (local.RefKind != RefKind.None) 176Debug.Assert(local.RefKind == RefKind.None);
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
43get { return RefKind.None; }
Lowering\SyntheticBoundNodeFactory.cs (7)
529Debug.Assert(CurrentFunction.RefKind == RefKind.None); 554RefKind refKind = RefKind.None, 594return SynthesizedParameterSymbol.Create(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, name); 1509RefKind refKind = RefKind.None, 1540refKind = RefKind.None; 1544case RefKind.None: 1576isRef: refKind != RefKind.None);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
834if (symbol.ScopedKind == ScopedKind.ScopedValue && symbol.RefKind == RefKind.None)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
254if (fields.Any(static f => f.RefKind != RefKind.None)) 457var fields = key.Fields.SelectAsArray(f => new AnonymousTypeField(f.Name, Location.None, typeWithAnnotations: default, refKind: RefKind.None, ScopedKind.None));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (2)
33paramsArr.Add(SynthesizedParameterSymbol.Create(this, property.TypeWithAnnotations, index, RefKind.None, property.Name)); 55get { return RefKind.None; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (2)
60new SynthesizedDelegateInvokeMethod.ParameterDescription(TypeWithAnnotations.Create(typeParams[i]), refKinds.IsNull ? RefKind.None : refKinds[i], ScopedKind.None, defaultValue: null, isParams: false, hasUnscopedRefAttribute: false)); 65var returnRefKind = (refKinds.IsNull || voidReturnTypeOpt is { }) ? RefKind.None : refKinds[parameterCount];
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (2)
25SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(this.Manager.System_Object), 0, RefKind.None, "value")); 40get { return RefKind.None; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
35public override RefKind RefKind => RefKind.None;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (1)
44get { return RefKind.None; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
41get { return RefKind.None; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
66get { return RefKind.None; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (1)
44get { return RefKind.None; }
Symbols\BaseTypeAnalysis.cs (1)
180if (field.RefKind != RefKind.None)
Symbols\Compilation_WellKnownMembers.cs (7)
747internal SynthesizedAttributeData? SynthesizeDynamicAttribute(TypeSymbol type, int customModifiersCount, RefKind refKindOpt = RefKind.None) 752if (type.IsDynamic() && refKindOpt == RefKind.None && customModifiersCount == 0) 891if (refKind != RefKind.None) 989if (refKind != RefKind.None) 1144return parameter.RefKind != RefKind.None; 1149return method.RefKind != RefKind.None; 1154return property.RefKind != RefKind.None;
Symbols\ErrorMethodSymbol.cs (1)
160get { return RefKind.None; }
Symbols\ErrorPropertySymbol.cs (1)
44public override RefKind RefKind { get { return RefKind.None; } }
Symbols\FieldSymbol.cs (1)
356if (DeriveUseSiteInfoFromType(ref result, this.TypeWithAnnotations, RefKind == RefKind.None ? AllowedRequiredModifierType.System_Runtime_CompilerServices_Volatile : AllowedRequiredModifierType.None) ||
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (14)
28RefKind refKind = RefKind.None; 44case SyntaxKind.RefKeyword when refKind == RefKind.None: 59Debug.Assert(refKind != RefKind.None); 73if (returnType.IsVoidType() && refKind != RefKind.None) 88if (refKind != RefKind.None) 285if (returnRefKind == RefKind.None) 349var returnVariance = RefKind == RefKind.None ? variance : VarianceKind.None; 364(VarianceKind.In, RefKind.None) => VarianceKind.Out, 365(VarianceKind.Out, RefKind.None) => VarianceKind.In, 495Debug.Assert(refCustomModifiers.IsDefaultOrEmpty || refKind != RefKind.None); 507Debug.Assert(refCustomModifiers.IsEmpty || refKind != RefKind.None); 583false => RefKind.None, 645var modifiersToSearch = RefKind != RefKind.None ? RefCustomModifiers : ReturnTypeWithAnnotations.CustomModifiers; 668var modifiersToSearch = RefKind != RefKind.None ? RefCustomModifiers : ReturnTypeWithAnnotations.CustomModifiers;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (4)
191? (refKind1 == RefKind.None) == (refKind2 == RefKind.None) 201=> refKind == RefKind.None ? RefKind.None : RefKind.Ref;
Symbols\LocalSymbol.cs (1)
358public bool IsRef => RefKind != RefKind.None;
Symbols\MemberSignatureComparer.cs (2)
751if ((refKind1 == RefKind.None) != (refKind2 == RefKind.None))
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
69RefKind targetSymbolRefKind = RefKind.None) 212return refKind == RefKind.None || !ConsumeFlag();
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
183(field.RefKind != RefKind.None) == fieldInfo.IsByRef && 254if ((candidateParam.RefKind != RefKind.None) != targetParam.IsByRef)
Symbols\Metadata\PE\PEFieldSymbol.cs (2)
325RefKind.None; 634if (RefKind != RefKind.None &&
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1084case RefKind.None: 1109case RefKind.None:
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
247RefKind refKind = RefKind.None; 253refKind = isByRef ? RefKind.Ref : RefKind.None; 318Debug.Assert(refKind != RefKind.None);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
223_refKind = RefKind.None; 282if (this.RefKind != RefKind.None && _setMethod != null)
Symbols\ParameterSignature.cs (2)
49if (refKind != RefKind.None) 51refs = ArrayBuilder<RefKind>.GetInstance(parm, RefKind.None);
Symbols\ParameterSymbol.cs (1)
153((refKind = RefKind) == RefKind.None ||
Symbols\RefKindExtensions.cs (3)
18return refKind != RefKind.None; 32return RefKind.None; 45case RefKind.None:
Symbols\Source\CustomModifierUtils.cs (3)
43destinationMethod.RefKind != RefKind.None ? constructedSourceMethod.RefCustomModifiers : ImmutableArray<CustomModifier>.Empty; 73const RefKind refKind = RefKind.None; 146destinationParameter.RefKind != RefKind.None ? sourceParameter.RefCustomModifiers : ImmutableArray<CustomModifier>.Empty,
Symbols\Source\GlobalExpressionVariable.cs (1)
67public sealed override RefKind RefKind => RefKind.None;
Symbols\Source\LambdaSymbol.cs (2)
346refKind = RefKind.None; 352refKind = RefKind.None;
Symbols\Source\LocalFunctionSymbol.cs (1)
256Debug.Assert(_refKind == RefKind.None
Symbols\Source\ParameterHelpers.cs (7)
659else if (refKind != RefKind.None && 890var refKind = RefKind.None; 902if (refKind == RefKind.None) 909if (refKind == RefKind.None) 916if (refKind == RefKind.None) 929Debug.Assert(refKind == RefKind.None); 937scope = (refKind == RefKind.None) ? ScopedKind.ScopedValue : ScopedKind.ScopedRef;
Symbols\Source\SourceComplexParameterSymbol.cs (2)
869return UseUpdatedEscapeRules && RefKind != RefKind.None; 1547Debug.Assert(refKind != RefKind.None || _refCustomModifiers.IsEmpty);
Symbols\Source\SourceConstructorSymbolBase.cs (1)
155get { return RefKind.None; }
Symbols\Source\SourceDelegateMethodSymbol.cs (8)
225SynthesizedParameterSymbol.Create(this, objectType, 0, RefKind.None, "object"), 226SynthesizedParameterSymbol.Create(this, intPtrType, 1, RefKind.None, "method"))); 236get { return RefKind.None; } 380parameters.Add(SynthesizedParameterSymbol.Create(this, asyncCallbackType, paramCount, RefKind.None, GetUniqueParameterName(parameters, "callback"))); 381parameters.Add(SynthesizedParameterSymbol.Create(this, objectType, paramCount + 1, RefKind.None, GetUniqueParameterName(parameters, "object"))); 393get { return RefKind.None; } 422if (p.RefKind != RefKind.None) 429parameters.Add(SynthesizedParameterSymbol.Create(this, iAsyncResultType, ordinal++, RefKind.None, GetUniqueParameterName(parameters, "result")));
Symbols\Source\SourceDestructorSymbol.cs (1)
115get { return RefKind.None; }
Symbols\Source\SourceEnumConstantSymbol.cs (1)
59public sealed override RefKind RefKind => RefKind.None;
Symbols\Source\SourceEventAccessorSymbol.cs (1)
168get { return RefKind.None; }
Symbols\Source\SourceLocalSymbol.cs (1)
67_scope = _refKind != RefKind.None
Symbols\Source\SourceMemberContainerSymbol.cs (14)
3683if (methodParam.RefKind != RefKind.None) 3706methodParams[0].RefKind == RefKind.None && 4032RefKind.None, 4077RefKind.None 4079RefKind.None, 4125RefKind.None)), 4126RefKind.None, 4181RefKind.None, 4262RefKind.None, 4355RefKind.None, 4386RefKind.None, 4451RefKind.None 4453RefKind.None, 4659var modifiers = SourceMemberFieldSymbol.MakeModifiers(this, fieldSyntax.Declaration.Variables[0].Identifier, fieldSyntax.Modifiers, isRefField: refKind != RefKind.None, diagnostics, out modifierErrors);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1412else if (parameters.Any(p => p.RefKind == RefKind.None && p.Type.IsRefLikeType))
Symbols\Source\SourceMemberFieldSymbol.cs (6)
447RefKind refKind = RefKind.None; 485Debug.Assert(refKind is RefKind.None or RefKind.Ref or RefKind.RefReadOnly); 487if (refKind != RefKind.None) 504Debug.Assert(refKindToAssert == RefKind.None); // Otherwise we might need to report an error 535var initializerOpt = executableBinder.BindInferredVariableInitializer(diagnostics, RefKind.None, syntaxNode, declarator); 564if (refKind != RefKind.None)
Symbols\Source\SourceMethodSymbol.cs (1)
65if (parameter.RefKind != RefKind.None)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
962if (refKind != RefKind.None) 1085if (this.RefKind != RefKind.None)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
165Debug.Assert(this.RefKind == RefKind.None || !returnType.IsVoidType() || returnTypeSyntax.HasErrors);
Symbols\Source\SourcePropertySymbolBase.cs (5)
216_lazyRefCustomModifiers = _refKind != RefKind.None ? overriddenOrImplementedProperty.RefCustomModifiers : ImmutableArray<CustomModifier>.Empty; 670if (RefKind != RefKind.None && IsRequired) 696if (this.RefKind != RefKind.None) 718if (_refKind != RefKind.None) 745else if (RefKind != RefKind.None)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
331if (p.RefKind != RefKind.None && p.RefKind != RefKind.In) 803get { return RefKind.None; }
Symbols\Source\ThisParameterSymbol.cs (1)
41return RefKind.None;
Symbols\SymbolExtensions.cs (3)
488refKind = RefKind.None; 506refKind = RefKind.None; 523refKind = RefKind.None;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
45public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
40ordinal: 0, RefKind.None, ScopedKind.None, "other", Locations)),
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
129if (ctor.ParameterCount == 1 && ctor.Parameters[0].RefKind == RefKind.None &&
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (2)
30RefKind.None, 133method.Parameters[0].RefKind == RefKind.None;
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
37RefKind.None,
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
45if (member is MethodSymbol candidate && candidate.ParameterCount == 1 && candidate.Parameters[0].RefKind == RefKind.None &&
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (2)
73ordinal: 0, RefKind.None, ScopedKind.None, "left", Locations), 76ordinal: 1, RefKind.None, ScopedKind.None, "right", Locations)));
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
45ordinal: 0, RefKind.None, ScopedKind.None, "other", Locations)),
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
36ordinal: 0, RefKind.None, ScopedKind.None, "obj", Locations)),
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
83public sealed override RefKind RefKind => RefKind.None;
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
97ordinal: 0, RefKind.None, ScopedKind.None, "builder", Locations)),
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
34RefKind.None,
Symbols\Synthesized\RefKindVector.cs (2)
45(false, false) => RefKind.None, 56RefKind.None => (false, false),
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
21: base(accessor, ordinal, paramType, RefKind.None, ParameterSymbol.ValueParameterName, accessor.Locations,
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
92Debug.Assert(property.RefKind is RefKind.None or RefKind.Ref or RefKind.RefReadOnly);
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
21SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(objectType), 0, RefKind.None, "object"), 22SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intPtrType), 1, RefKind.None, "method"));
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (1)
53m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, boolArrayType, 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (2)
53m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, annotatedByteType, 0, RefKind.None)), 57m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, byteArrayType, 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (1)
41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemByteType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (1)
41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemBooleanType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (1)
39m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(int32Type), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (6)
117get { return RefKind.None; } 398refKind: RefKind.None, 416refKind: RefKind.None, 509RefKind.None, 528TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray")); 599RefKind.None,
Symbols\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
29public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
36public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
200get { return RefKind.None; }
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
151get { return RefKind.None; }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
116get { return RefKind.None; }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
220return RefKind.None; 468) : base(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, ScopedKind.None, name)
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
36public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedLocal.cs (1)
41RefKind refKind = RefKind.None
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
67TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args")); 150return RefKind.None;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
131return RefKind.None;
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (2)
21this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s"))); 31this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s")));
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
29SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
Symbols\Synthesized\SynthesizedThrowIfNullMethod.cs (2)
22SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(argumentParamType), ordinal: 0, RefKind.None, "argument"), 23SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramNameParamType), ordinal: 1, RefKind.None, "paramName")));
Symbols\Synthesized\SynthesizedThrowMethod.cs (1)
18this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "paramName")));
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
19this.SetParameters(ImmutableArray.Create(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "unmatchedValue")));
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
157public override RefKind RefKind => RefKind.None;
Symbols\TypeSymbol.cs (1)
1960RefKind interfaceMemberRefKind = RefKind.None;
Symbols\VarianceSafety.cs (3)
163requireInputSafety: method.RefKind != RefKind.None, 199requireInputSafety: hasSetter || !(property.GetMethod?.RefKind == RefKind.None), 242requireOutputSafety: param.RefKind != RefKind.None,
Syntax\SyntaxNodeExtensions.cs (2)
283refKind = RefKind.None; 324refKind = RefKind.None;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
ArgumentSyntaxExtensions.cs (1)
31_ => RefKind.None,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
CSharpSyntaxGeneratorInternal.cs (1)
123RefKind.None => new SyntaxTokenList(),
CSharpTypeInferenceService.TypeInferrer.cs (1)
727return InferTypeInArgument(index, parameterizedSymbols, name, RefKind.None);
MakeLocalFunctionStaticCodeFixHelper.cs (1)
223refKind: RefKind.None,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (45)
CodeGen\CodeGenFunctionPointersTests.cs (29)
102(RefKind.None, IsSpecialType(SpecialType.System_Int32)), 103(RefKind.None, IsSpecialType(SpecialType.System_String))); 197(RefKind.None, IsVoidType()), 198(RefKind.None, IsFunctionPointerTypeSymbol(CallingConvention.Standard, 199(RefKind.None, IsVoidType()), 200(RefKind.None, IsSpecialType(SpecialType.System_Int32))) 205(RefKind.None, IsFunctionPointerTypeSymbol(CallingConvention.Default, 206(RefKind.None, IsTypeName("S")))), 207(RefKind.None, IsTypeName("C"))); 573(RefKind.None, IsVoidType()), 578(RefKind.None, IsVoidType()), 583(RefKind.None, IsVoidType()), 588(RefKind.None, IsVoidType()), 649(RefKind.None, IsVoidType()), 655(RefKind.None, 657(RefKind.None, IsSpecialType(SpecialType.System_Int32)))), 660(RefKind.None, 662(RefKind.None, IsVoidType())))))); 790(RefKind.None, IsVoidType()), 791(RefKind.None, IsSpecialType(SpecialType.System_String)))); 794(RefKind.None, IsSpecialType(SpecialType.System_Int32)))); 820(RefKind.None, IsTypeName("C")), 821(RefKind.None, IsTypeName("C"))); 988(RefKind.None, IsVoidType())); 996(RefKind.None, IsVoidType())); 7661returnRefKind: RefKind.None, parameterTypes: ImmutableArray<TypeWithAnnotations>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, 7670parameterRefCustomModifiers: default, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<TypeWithAnnotations>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, 7746returnRefKind: RefKind.None, parameterTypes: ImmutableArray<TypeWithAnnotations>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, 7755returnRefKind: RefKind.None, parameterTypes: ImmutableArray<TypeWithAnnotations>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty,
CodeGen\CodeGenReadonlyStructTests.cs (10)
874Assert.Equal(RefKind.None, namedType.Constructors[0].ThisParameter.RefKind); 875Assert.Equal(RefKind.None, namedType.GetMethod("M1").ThisParameter.RefKind); 876Assert.Equal(RefKind.None, namedType.GetMethod("ToString").ThisParameter.RefKind); 881Assert.Equal(RefKind.None, namedType.Constructors[0].ThisParameter.RefKind); 882Assert.Equal(RefKind.None, namedType.GetMethod("Invoke").ThisParameter.RefKind); 1038Assert.Equal(RefKind.None, namedType.Constructors[0].ThisParameter.RefKind); 1039Assert.Equal(RefKind.None, namedType.GetMethod("M1").ThisParameter.RefKind); 1040Assert.Equal(RefKind.None, namedType.GetMethod("ToString").ThisParameter.RefKind); 1045Assert.Equal(RefKind.None, namedType.Constructors[0].ThisParameter.RefKind); 1046Assert.Equal(RefKind.None, namedType.GetMethod("Invoke").ThisParameter.RefKind);
Emit\EmitMetadataTests.cs (2)
2025Assert.Equal(RefKind.None, m.Parameters[0].RefKind); 2091if (invoke.Parameters[i].RefKind != RefKind.None)
Emit\InAttributeModifierTests.cs (2)
3832Assert.Equal(RefKind.None, classMethod.RefKind); 3861Assert.Equal(RefKind.None, classMethod.RefKind);
Emit\NoPiaEmbedTypes.cs (2)
1542Assert.Equal(RefKind.None, param.RefKind); 1548Assert.Equal(RefKind.None, param.RefKind);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (23)
CompilationContext.cs (7)
375return new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true }; 634return new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true }; 647return new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true }; 659return new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true }; 671var statement = new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true }; 716RefKind.None, 742return new BoundReturnStatement(syntax, RefKind.None, expression, @checked: false) { WasCompilerGenerated = true };
CSharpEESymbolProvider.cs (3)
43refKind = RefKind.None; 49refKind = info.IsByRef ? RefKind.Ref : RefKind.None; 67type = IncludeDynamicAndTupleElementNamesIfAny(type, RefKind.None, dynamicFlagsOpt, tupleElementNamesOpt);
EEAssemblyBuilder.cs (1)
109((local.RefKind == RefKind.None) ? LocalSlotConstraints.None : LocalSlotConstraints.ByRef);
Rewriters\LocalDeclarationRewriter.cs (1)
142var bytes = compilation.GetCustomTypeInfoPayload(local.Type, customModifiersCount: 0, refKind: RefKind.None);
SymbolExtensions.cs (1)
24return method.DeclaringCompilation.GetCustomTypeInfoPayload(method.ReturnType, method.ReturnTypeWithAnnotations.CustomModifiers.Length + method.RefCustomModifiers.Length, RefKind.None);
Symbols\DisplayClassInstance.cs (1)
46Debug.Assert(local.RefKind == RefKind.None);
Symbols\DisplayClassVariable.cs (1)
219public override RefKind RefKind => RefKind.None;
Symbols\EEConstructorSymbol.cs (1)
34new BoundReturnStatement(syntax, RefKind.None, null, @checked: false))));
Symbols\EEDisplayClassFieldLocalSymbol.cs (1)
77get { return RefKind.None; }
Symbols\EELocalConstantSymbol.cs (1)
99get { return RefKind.None; }
Symbols\EEMethodSymbol.cs (1)
545statementsBuilder.Add(new BoundReturnStatement(syntax, RefKind.None, expressionOpt: null, @checked: false));
Symbols\PlaceholderLocalSymbol.cs (2)
116get { return RefKind.None; } 228RefKind.None,
Symbols\PlaceholderMethodSymbol.cs (1)
156get { return RefKind.None; }
Symbols\SynthesizedContextMethodSymbol.cs (1)
127get { return RefKind.None; }
Microsoft.CodeAnalysis.CSharp.Features (13)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
101refKind: dataFlow.WrittenInside.Contains(capture) ? RefKind.Ref : RefKind.None,
Completion\Providers\ContextVariableArgumentProvider.cs (1)
47case RefKind.None:
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
311methodSymbol.RefKind == RefKind.None) 348methodSymbol.RefKind == RefKind.None &&
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
112refKind: RefKind.None,
GenerateConstructor\CSharpGenerateConstructorService.cs (1)
77refKind: RefKind.None,
GenerateMember\GenerateParameterizedMember\CSharpGenerateConversionService.cs (1)
215refKind: RefKind.None,
GenerateMember\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
45=> _invocationExpression.IsParentKind(SyntaxKind.RefExpression) ? RefKind.Ref : RefKind.None;
GenerateType\CSharpGenerateTypeService.cs (1)
842refKind: RefKind.None,
ImplementInterface\CSharpImplementInterfaceService.cs (1)
97g.Argument(DisposingName, RefKind.None, g.FalseLiteralExpression()))));
MakeLocalFunctionStaticCodeFixHelper.cs (1)
223refKind: RefKind.None,
SignatureHelp\AbstractCSharpSignatureHelpProvider.LightweightOverloadResolution.cs (2)
152if (parameterRefKind == RefKind.None) 174if (parameterRefKind == RefKind.In && argumentRefKind == RefKind.None)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (112)
Semantics\FunctionPointerTests.cs (2)
3921(RefKind.None, IsVoidType()), 3922(RefKind.None, IsErrorType()));
Semantics\LambdaTests.cs (2)
7079Assert.Equal(RefKind.None, lambdaParameter1.RefKind); 7084Assert.Equal(RefKind.None, lambdaParameter2.RefKind);
Semantics\RefFieldTests.cs (106)
10469VerifyParameterSymbol(parameters[0], "R x1", RefKind.None, ScopedKind.None); 10470VerifyParameterSymbol(parameters[1], "scoped R y1", RefKind.None, ScopedKind.ScopedValue); 10578VerifyParameterSymbol(localFunctions[0].Parameters[0], "R x1", RefKind.None, ScopedKind.None); 10579VerifyParameterSymbol(localFunctions[0].Parameters[1], "scoped R y1", RefKind.None, ScopedKind.ScopedValue); 10651verifyParameter(delegateTypesAndLambdas[0], 0, "R", "x1", RefKind.None, ScopedKind.None, false); 10652verifyParameter(delegateTypesAndLambdas[0], 1, "scoped R", "y1", RefKind.None, ScopedKind.ScopedValue, false); 10708VerifyParameterSymbol(comp.GetMember<NamedTypeSymbol>("D1").DelegateInvokeMethod.Parameters[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 10774VerifyParameterSymbol(methods[0].Parameters[0], "R", RefKind.None, ScopedKind.None); 10796VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F0").Parameters[0], "scoped R r", RefKind.None, ScopedKind.ScopedValue); 10906VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F0").Parameters[0], "scoped s", RefKind.None, ScopedKind.None); 10907VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "scoped scoped s", RefKind.None, ScopedKind.ScopedValue); 10942VerifyParameterSymbol(lambdas[0].Parameters[0], "R r1", RefKind.None, ScopedKind.None); 10943VerifyParameterSymbol(lambdas[1].Parameters[0], "R r2", RefKind.None, ScopedKind.None); 11022VerifyParameterSymbol(parameters[0], "R a", RefKind.None, ScopedKind.None); 11100VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C..ctor").ThisParameter, "C this", RefKind.None, ScopedKind.None); 11101VerifyParameterSymbol(comp.GetMember<MethodSymbol>("C.F1").ThisParameter, "C this", RefKind.None, ScopedKind.None); 11153VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F0").Parameters[0], "R<System.Object> r", RefKind.None, ScopedKind.None); 11154VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F1").Parameters[0], "scoped R<System.Object> r", RefKind.None, ScopedKind.ScopedValue); 11155VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Extensions.F2").Parameters[0], "scoped", RefKind.None, ScopedKind.None); 11174VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "scoped params System.Object[] args", RefKind.None, ScopedKind.ScopedValue); 11430verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P2"), "R1 value", RefKind.None, ScopedKind.None); 11431verifyValueParameter(comp.GetMember<PropertySymbol>("R2.P3"), "R1 value", RefKind.None, ScopedKind.None); 11457VerifyParameterSymbol(method.Parameters[0], "scoped R<System.Int32> x", RefKind.None, ScopedKind.ScopedValue); 11491VerifyParameterSymbol(method.Parameters[0], "scoped R x", RefKind.None, ScopedKind.ScopedValue); 11571VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 11574VerifyLocalSymbol(locals[3], "scoped R r11", RefKind.None, ScopedKind.ScopedValue); 11645Assert.Equal(RefKind.None, f.RefKind); 11708VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 11894VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 11895VerifyLocalSymbol(locals[1], "scoped R r2", RefKind.None, ScopedKind.ScopedValue); 11896VerifyLocalSymbol(locals[2], "scoped R r5", RefKind.None, ScopedKind.ScopedValue); 11897VerifyLocalSymbol(locals[3], "scoped R r11", RefKind.None, ScopedKind.ScopedValue); 11898VerifyLocalSymbol(locals[4], "scoped R r21", RefKind.None, ScopedKind.ScopedValue); 11899VerifyLocalSymbol(locals[5], "scoped R r51", RefKind.None, ScopedKind.ScopedValue); 12084Assert.Equal(RefKind.None, f.RefKind); 12305VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 12306VerifyLocalSymbol(locals[1], "scoped R r2", RefKind.None, ScopedKind.ScopedValue); 12307VerifyLocalSymbol(locals[2], "scoped R r5", RefKind.None, ScopedKind.ScopedValue); 12308VerifyLocalSymbol(locals[3], "scoped R r11", RefKind.None, ScopedKind.ScopedValue); 12309VerifyLocalSymbol(locals[4], "scoped R r21", RefKind.None, ScopedKind.ScopedValue); 12310VerifyLocalSymbol(locals[5], "scoped R r51", RefKind.None, ScopedKind.ScopedValue); 12491Assert.Equal(RefKind.None, f.RefKind); 12661VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 12664VerifyLocalSymbol(locals[3], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 12716VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 12719VerifyLocalSymbol(locals[3], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 12775VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 12776VerifyLocalSymbol(locals[2], "scoped s3", RefKind.None, ScopedKind.None); 12777VerifyLocalSymbol(locals[4], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 12778VerifyLocalSymbol(locals[6], "scoped scoped s6", RefKind.None, ScopedKind.ScopedValue); 12820VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 12821VerifyLocalSymbol(locals[1], "scoped s3", RefKind.None, ScopedKind.None); 12822VerifyLocalSymbol(locals[2], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 12823VerifyLocalSymbol(locals[3], "scoped scoped s6", RefKind.None, ScopedKind.ScopedValue); 12847VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.None); 12872VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.None); 12892VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.None); 12914VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.None); 12955VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 13019VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 13095VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 13096VerifyLocalSymbol(locals[2], "scoped R<System.Int32> r3", RefKind.None, ScopedKind.ScopedValue); 13166VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 13167VerifyLocalSymbol(locals[1], "scoped R<System.Int32> r3", RefKind.None, ScopedKind.ScopedValue); 14032VerifyLocalSymbol(locals[0], "R r11", RefKind.None, ScopedKind.None); 14033VerifyLocalSymbol(locals[1], "R r12", RefKind.None, ScopedKind.None); 14034VerifyLocalSymbol(locals[2], "scoped R r21", RefKind.None, ScopedKind.ScopedValue); 14035VerifyLocalSymbol(locals[3], "scoped R r22", RefKind.None, ScopedKind.ScopedValue); 14108VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 14353VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 14354VerifyLocalSymbol(locals[1], "scoped R r2", RefKind.None, ScopedKind.ScopedValue); 14355VerifyLocalSymbol(locals[2], "scoped R r5", RefKind.None, ScopedKind.ScopedValue); 14356VerifyLocalSymbol(locals[3], "scoped R r11", RefKind.None, ScopedKind.ScopedValue); 14357VerifyLocalSymbol(locals[4], "scoped R r21", RefKind.None, ScopedKind.ScopedValue); 14358VerifyLocalSymbol(locals[5], "scoped R r51", RefKind.None, ScopedKind.ScopedValue); 14561VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 14564VerifyLocalSymbol(locals[3], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 14587VerifyLocalSymbol(locals[0], "System.Boolean scoped", RefKind.None, ScopedKind.None); 14648VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 17401VerifyParameterSymbol(delegateInvokeMethods[0].Parameters[0], "R arg1", RefKind.None, ScopedKind.None); 17402VerifyParameterSymbol(delegateInvokeMethods[0].Parameters[1], "scoped R arg2", RefKind.None, ScopedKind.ScopedValue); 22674VerifyParameterSymbol(type.GetMethod("F4").Parameters[0], "R<T> t4", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: true); 22778VerifyParameterSymbol(parameters[0], "System.Int32 x", RefKind.None, default, expectedHasUnscopedRefAttribute: true); 22779VerifyParameterSymbol(parameters[1], "System.Object y", RefKind.None, default, expectedHasUnscopedRefAttribute: true); 23086VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "R<System.Int32> r1", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: false); 23087VerifyParameterSymbol(baseType.GetMethod("F2A").Parameters[0], "scoped R<System.Int32> r2", RefKind.None, ScopedKind.ScopedValue, expectedHasUnscopedRefAttribute: false); 23088VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "R<System.Int32> r3", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: true); 23089VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "R<System.Int32> r4", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: true); 23114VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F1").Parameters[0], "R<T> r1", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: true); 24206verifyParameter(delegateTypesAndLambdas[1], 0, "R", "r2", RefKind.None, ScopedKind.None); 24256VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F2").Parameters[0], "R", RefKind.None, ScopedKind.None); 24318VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F2").Parameters[0], "R r2", RefKind.None, ScopedKind.None, expectedHasUnscopedRefAttribute: true); 26295VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 26385VerifyLocalSymbol(locals[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 26505VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 26508VerifyLocalSymbol(locals[3], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 26606VerifyLocalSymbol(locals[0], "scoped s1", RefKind.None, ScopedKind.None); 26609VerifyLocalSymbol(locals[3], "scoped scoped s4", RefKind.None, ScopedKind.ScopedValue); 26657VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 26658VerifyLocalSymbol(locals[1], "scoped R<System.Int32> r3", RefKind.None, ScopedKind.ScopedValue); 26717VerifyLocalSymbol(locals[0], "scoped R<System.Int32> r1", RefKind.None, ScopedKind.ScopedValue); 26718VerifyLocalSymbol(locals[1], "scoped R<System.Int32> r3", RefKind.None, ScopedKind.ScopedValue); 26941VerifyLocalSymbol(locals[0], "scoped R r2", RefKind.None, ScopedKind.ScopedValue); 26942VerifyLocalSymbol(locals[1], "scoped R r5", RefKind.None, ScopedKind.ScopedValue); 26989VerifyLocalSymbol(locals[0], "scoped R r2", RefKind.None, ScopedKind.ScopedValue); 26990VerifyLocalSymbol(locals[1], "scoped R r5", RefKind.None, ScopedKind.ScopedValue);
Semantics\RefLocalsAndReturnsTests.cs (2)
4867Assert.Equal(RefKind.None, f.RefKind); 4906Assert.Equal(RefKind.None, f.RefKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (41)
SymbolDisplay\SymbolDisplayTests.cs (1)
6548Assert.Equal(RefKind.None, local.RefKind);
Symbols\FunctionPointerTypeSymbolTests.cs (35)
26[InlineData("", RefKind.None, "delegate*<System.Object>")] 113verifyRefKind(RefKind.None, mParams[0]); 117verifyRefKind(RefKind.None, mParams[4]); 118verifyRefKind(RefKind.None, mParams[5]); 120verifyRefKind(RefKind.None, mParams[7]); 481Assert.Equal(RefKind.None, fourthParam.Parameters.Single().RefKind); 574Assert.Equal(RefKind.None, firstParam.Parameters.Single().RefKind); 577Assert.Equal(RefKind.None, secondParam.Parameters.Single().RefKind); 1538Assert.Throws<ArgumentNullException>("returnType", () => comp.CreateFunctionPointerTypeSymbol(returnType: null!, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty)); 1539Assert.Throws<ArgumentNullException>("parameterTypes", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: default, parameterRefKinds: ImmutableArray<RefKind>.Empty)); 1540Assert.Throws<ArgumentNullException>("parameterTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray.Create((ITypeSymbol?)null)!, parameterRefKinds: ImmutableArray.Create(RefKind.None))); 1541Assert.Throws<ArgumentNullException>("parameterRefKinds", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: default)); 1542Assert.Throws<ArgumentNullException>("callingConventionTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, ImmutableArray.Create((INamedTypeSymbol)null!))); 1543Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray.Create(RefKind.None))); 1545Assert.Throws<ArgumentOutOfRangeException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: (SignatureCallingConvention)10)); 1546Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Default, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1547Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.StdCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1548Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.FastCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1549Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.CDecl, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1550Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.ThisCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1551Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, callingConventionTypes: ImmutableArray.Create(@string)!)); 1559var ptr = comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.VarArgs); 1575RefKind.None, 1577ImmutableArray.Create(RefKind.None, RefKind.None)); 1607RefKind.None, 1644var ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, convention); 1659var ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType, stdcallType)!); 1664ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType)!); 1970returnRefKind: RefKind.None, 2050returnRefKind: RefKind.None, 2117returnRefKind: RefKind.None, 2176returnRefKind: RefKind.None,
Symbols\Metadata\PE\DynamicTransformsTests.cs (2)
283Assert.Equal(RefKind.None, f3.Parameters[0].RefKind); 307Assert.Equal(RefKind.None, f4.Parameters[0].RefKind);
Symbols\PEParameterSymbolTests.cs (1)
120Assert.Equal(RefKind.None, z.RefKind);
Symbols\Source\DelegateTests.cs (1)
179if (invoke.Parameters[i].RefKind != RefKind.None)
Symbols\TypeTests.cs (1)
517Assert.Equal(RefKind.None, p3.RefKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (1)
570Assert.Equal(RefKind.None, valueParameter.RefKind);
FunctionPointerUtilities.cs (2)
286case RefKind.None: 318case RefKind.None:
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Metadata\WinMdDumpTest.cs (2)
343AppendSignatureType(result, method.ReturnType, RefKind.None); 420if (refKind != RefKind.None)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
ArgumentSyntaxExtensions.cs (1)
31_ => RefKind.None,
CodeGeneration\CSharpSyntaxGenerator.cs (2)
215case RefKind.None: 3620=> this.ParameterDeclaration(identifier, type, initializer: null, RefKind.None);
CSharpSyntaxGeneratorInternal.cs (1)
123RefKind.None => new SyntaxTokenList(),
CSharpTypeInferenceService.TypeInferrer.cs (1)
727return InferTypeInArgument(index, parameterizedSymbols, name, RefKind.None);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
532new[] { Generator.Argument("goo", RefKind.None, Generator.IdentifierName("x")), 533Generator.Argument("bar", RefKind.None, Generator.IdentifierName("y")) }), "(goo: x, bar: y)");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
CodeGeneration\CodeGenerationTests.cs (7)
165RefKind.None, 362RefKind.None, 459RefKind.None, 470RefKind.None, 494RefKind.None, 672attributes: default, RefKind.None, isParams, GetTypeSymbol(s.Compilation, type), name, 679attributes: default, RefKind.None, isParams, GetTypeSymbol(s.Compilation, typeFullName, typeArrayRank), parameterName,
CodeGeneration\ExpressionGenerationTests.cs (2)
383f.Argument("n", RefKind.None, f.IdentifierName("a"))), 449f.Argument("n", RefKind.None, f.IdentifierName("a"))),
Microsoft.CodeAnalysis.Features (28)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
112return constructorParams.All(parameter => parameter.RefKind == RefKind.None) &&
ChangeSignature\AbstractChangeSignatureService.cs (1)
823refKind: RefKind.None,
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
31|| context.Parameter.RefKind != RefKind.None;
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
72if (syntaxFacts.GetRefKindOfArgument(argument) != RefKind.None)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
862RefKind.None,
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
382refKind: RefKind.None,
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
373parameterBehavior == ParameterBehavior.Out ? RefKind.Out : RefKind.None;
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
107where c.Parameters.All(p => p.RefKind == RefKind.None) && !c.Parameters.Any(static p => p.IsParams)
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
141refKind: RefKind.None,
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
112refKind: RefKind.None,
GenerateMember\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
81refKind: RefKind.None,
GenerateMember\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
256refKind: RefKind.None,
GenerateMember\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
68var setAccessor = _isReadonly || _refKind != RefKind.None 119return _state.TypeToGenerateIn.TypeKind != TypeKind.Interface && _refKind != RefKind.None
GenerateMember\GenerateVariable\AbstractGenerateVariableService.cs (4)
155document, state, generateProperty: false, isReadonly: false, isConstant: true, refKind: RefKind.None, fallbackOptions)); 169document, state, generateProperty: false, isReadonly: true, isConstant: false, refKind: RefKind.None, fallbackOptions)); 183document, state, generateProperty: false, isReadonly: false, isConstant: false, refKind: RefKind.None, fallbackOptions)); 268return RefKind.None;
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
50RefKind.None,
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
50RefKind.None,
ImplementInterface\AbstractImplementInterfaceService.DisposePatternCodeAction.cs (1)
296g.Argument(DisposingName, RefKind.None, g.TrueLiteralExpression())))));
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
363RefKind.None,
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
587? _generator.Argument(parameterName, RefKind.None, newArgumentExpression)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
144setMethod.Parameters is [{ RefKind: RefKind.None } parameter] &&
SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
796if ((symbol.RefKind == RefKind.None) == parameterInfo.IsRefOrOut)
UseCompoundAssignmentUtilities.cs (1)
133if (property.RefKind == RefKind.None)
UseConditionalExpressionForReturnHelpers.cs (2)
81syntaxFacts, anyReturn.GetRefKind(containingSymbol) != RefKind.None, 122isRef = anyReturn.GetRefKind(containingSymbol) != RefKind.None;
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\OperationTreeVerifier.cs (1)
898Assert.Equal(RefKind.None, operation.GetArgumentRefKind(i));
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\OperationTests.cs (1)
50Assert.Equal(RefKind.None, dynamicExpression.GetArgumentRefKind(0));
Microsoft.CodeAnalysis.VisualBasic (7)
Compilation\ClsComplianceChecker.vb (1)
958builder.Add(If(parameter.IsByRef, RefKind.Ref, RefKind.None))
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
527If symbol.RefKind <> RefKind.None AndAlso IsExplicitByRefParameter(symbol) Then
Symbols\FieldSymbol.vb (1)
443Return RefKind.None
Symbols\MethodSymbol.vb (1)
1027Return If(Me.ReturnsByRef, RefKind.Ref, RefKind.None)
Symbols\ParameterSymbol.vb (1)
302Return If(Me.IsByRef, RefKind.Ref, RefKind.None)
Symbols\PropertySymbol.vb (1)
594Return If(Me.ReturnsByRef, RefKind.Ref, RefKind.None)
Symbols\Source\LocalSymbol.vb (1)
300Return RefKind.None
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
ExpressionSyntaxExtensions.vb (3)
287Return parameter IsNot Nothing AndAlso parameter.RefKind <> RefKind.None 302Return method.Parameters(index).RefKind <> RefKind.None 307Return prop.Parameters(index).RefKind <> RefKind.None
ParenthesizedExpressionSyntaxExtensions.vb (1)
288parameter.RefKind <> RefKind.None Then
VisualBasicSyntaxFacts.vb (1)
598Return RefKind.None
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
240refKind:=RefKind.None,
Microsoft.CodeAnalysis.VisualBasic.Features (12)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (3)
145refKind:=RefKind.None, name:=eventHandlerName, 294modifiers:=Nothing, returnType:=returnType, refKind:=RefKind.None, 394refKind:=RefKind.None, name:=actualEventName + "Handler",
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (1)
108Return parameter.RefKind <> RefKind.None
ExtractMethod\Extensions.vb (1)
149If parameter.RefKind <> RefKind.None Then
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
78refKind:=RefKind.None,
GenerateConstructor\VisualBasicGenerateConstructorService.vb (1)
162Return arguments.SelectAsArray(Function(a) New Argument(RefKind.None, TryCast(a, SimpleArgumentSyntax)?.NameColonEquals?.Name.Identifier.ValueText, a.GetArgumentExpression()))
GenerateMember\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (1)
155refKind:=RefKind.None,
GenerateMember\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (2)
38Return RefKind.None 133Me.InvocationExpression.ArgumentList.Arguments.Select(Function(a) RefKind.None).ToImmutableArray(),
GenerateType\VisualBasicGenerateTypeService.vb (1)
704refKind:=RefKind.None,
ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
118g.Argument(DisposingName, RefKind.None, g.FalseLiteralExpression()))))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\RefFieldTests.vb (1)
120Assert.Equal(CodeAnalysis.RefKind.None, DirectCast(field, IFieldSymbol).RefKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (8)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
924If refKind <> RefKind.None Then 1636Return Argument(name, RefKind.None, expression)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\ExpressionSyntaxExtensions.vb (3)
287Return parameter IsNot Nothing AndAlso parameter.RefKind <> RefKind.None 302Return method.Parameters(index).RefKind <> RefKind.None 307Return prop.Parameters(index).RefKind <> RefKind.None
ParenthesizedExpressionSyntaxExtensions.vb (1)
288parameter.RefKind <> RefKind.None Then
Simplification\VisualBasicSimplificationService.Expander.vb (1)
325parameter.RefKind <> RefKind.None Then
VisualBasicSyntaxFacts.vb (1)
598Return RefKind.None
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.vb (2)
472{Generator.Argument("goo", RefKind.None, Generator.IdentifierName("x")), 473Generator.Argument("bar", RefKind.None, Generator.IdentifierName("y"))}), "(goo:=x, bar:=y)")
Microsoft.CodeAnalysis.Workspaces (16)
CodeGenerationConstructorSymbol.cs (1)
30refKind: RefKind.None,
CodeGenerationConversionSymbol.cs (1)
34refKind: RefKind.None,
CodeGenerationDestructorSymbol.cs (1)
21refKind: RefKind.None,
CodeGenerationFieldSymbol.cs (1)
92public RefKind RefKind => RefKind.None;
CodeGenerationOperatorSymbol.cs (1)
35refKind: RefKind.None,
CodeGenerationSymbolFactory.cs (2)
269=> CreateParameterSymbol(RefKind.None, type, name); 394refKind: RefKind.None,
Editing\SyntaxGenerator.cs (3)
317RefKind refKind = RefKind.None) 1920=> TypeExpression(typeSymbol, RefKind.None); 2235=> Argument(name: null, RefKind.None, expression);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (1)
434if (symbol is IMethodSymbol method && method.Parameters.All(p => p.RefKind == RefKind.None))
OperationExtensions.cs (1)
227return containingMethod?.RefKind ?? RefKind.None;
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
138refKind: RefKind.None,
Shared\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
48refKind: RefKind.None,
SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (2)
85: (rk1 == RefKind.None) == (rk2 == RefKind.None);
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
196refKind: RefKind.None,
Microsoft.VisualStudio.LanguageServices.Implementation (7)
CodeModel\AbstractCodeModelObject_CodeGen.cs (7)
77refKind: RefKind.None, 99refKind: RefKind.None, 110refKind: RefKind.None, 155refKind: RefKind.None, 193refKind: RefKind.None, 209refKind: RefKind.None, 221refKind: RefKind.None,
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
298Dim includedInTest = {RefKind.None, RefKind.Ref, RefKind.Out, RefKind.In, RefKind.RefReadOnly}