89 references to RefReadOnlyParameter
Microsoft.CodeAnalysis (3)
Symbols\RefKind.cs (3)
59case RefKind.RefReadOnlyParameter: return "ref readonly"; 82case RefKind.RefReadOnlyParameter: return "ref readonly "; 93internal const RefKind StrictIn = RefKind.RefReadOnlyParameter + 1;
Microsoft.CodeAnalysis.CSharp (69)
Binder\Binder.ValueChecks.cs (2)
1119if (parameterSymbol.RefKind is RefKind.In or RefKind.RefReadOnlyParameter && RequiresAssignableVariable(valueKind)) 2350parameter?.RefKind is RefKind.In or RefKind.RefReadOnlyParameter)
Binder\Binder_Attributes.cs (1)
250if (attributeConstructor.Parameters.Any(static p => p.RefKind is RefKind.In or RefKind.RefReadOnlyParameter))
Binder\Binder_Crefs.cs (1)
939refKind = RefKind.RefReadOnlyParameter;
Binder\Binder_Expressions.cs (3)
3415getCorrespondingParameter(in result, parameters, arg).RefKind == RefKind.RefReadOnlyParameter) 3439getCorrespondingParameter(in result, parameters, arg).RefKind == RefKind.RefReadOnlyParameter) 3885argumentRefKindsBuilder.Add(refKind == RefKind.RefReadOnlyParameter ? RefKind.In : refKind);
Binder\ForEachLoopBinder.cs (1)
1203patternDisposeMethod.ParameterRefKinds.All(static refKind => refKind is RefKind.None or RefKind.In or RefKind.RefReadOnlyParameter));
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
2659RefKind.In or RefKind.RefReadOnlyParameter => true, 3903else if (paramRefKind == RefKind.RefReadOnlyParameter && argRefKind is RefKind.None or RefKind.Ref or RefKind.In) 3938(RefKind.RefReadOnlyParameter, RefKind.Ref) or 3939(RefKind.RefReadOnlyParameter, RefKind.In) or 3940(RefKind.In, RefKind.RefReadOnlyParameter))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1255!(refParameter == RefKind.RefReadOnlyParameter && refArg is RefKind.None or RefKind.Ref or RefKind.In)) 1276else if (refParameter is RefKind.None or RefKind.In or RefKind.RefReadOnlyParameter)
BoundTree\Constructors.cs (3)
199RefKind.RefReadOnlyParameter => argumentRefKind is RefKind.In or RefKindExtensions.StrictIn, 234if (!result.IsDefaultOrEmpty && result.Contains(RefKind.RefReadOnlyParameter)) 240builder.Add(refKind == RefKind.RefReadOnlyParameter ? RefKind.In : refKind);
CodeGen\CodeGenerator_HasHome.cs (2)
88((BoundParameter)expression).ParameterSymbol.RefKind is not (RefKind.In or RefKind.RefReadOnlyParameter); 122(IsAnyReadOnly(addressKind) && lhsRefKind is RefKind.RefReadOnly or RefKind.RefReadOnlyParameter);
CodeGen\EmitExpression.cs (4)
981RefKind.RefReadOnlyParameter => argRefKind is RefKind.In or RefKindExtensions.StrictIn, 988Debug.Assert(parameters[i].RefKind != RefKind.RefReadOnlyParameter, 994RefKind.RefReadOnlyParameter => RefKind.In, // should not happen, asserted above 2994LocalDefinition temp = EmitAddress(assignmentOperator.Right, lhs.GetRefKind() is RefKind.RefReadOnly or RefKindExtensions.StrictIn or RefKind.RefReadOnlyParameter ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
FlowAnalysis\AbstractFlowPass.cs (1)
1552case RefKind.RefReadOnlyParameter:
FlowAnalysis\NullableWalker.cs (1)
2387if (refKind is RefKind.None or RefKind.In or RefKind.RefReadOnlyParameter)
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
882local = _factory.StoreToTemp(visitedArgument, out var store, refKind: paramRefKind is RefKind.In or RefKind.RefReadOnlyParameter ? RefKind.In : argRefKind); 1161if (paramRefKind is RefKind.In or RefKind.RefReadOnlyParameter) 1363if (paramRefKind is RefKind.In or RefKind.RefReadOnlyParameter) 1387refKind: paramRefKind is RefKind.In or RefKind.RefReadOnlyParameter
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
147.All(p => p.RefKind is RefKind.None or RefKind.In or RefKind.RefReadOnlyParameter));
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
500Debug.Assert(method.Parameters.AsSpan()[1..].All(static (p) => (p.IsOptional || p.IsParams) && p.RefKind is RefKind.None or RefKind.In or RefKind.RefReadOnlyParameter)); 507Debug.Assert(method.ParameterRefKinds.IsDefaultOrEmpty || method.ParameterRefKinds.All(static refKind => refKind is RefKind.In or RefKind.RefReadOnlyParameter or RefKind.None));
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
793Debug.Assert(refKind != RefKind.RefReadOnlyParameter);
Lowering\SyntheticBoundNodeFactory.cs (3)
862if (!result.IsDefaultOrEmpty && (result.Contains(RefKind.RefReadOnlyParameter) || 871RefKind.In or RefKind.RefReadOnlyParameter when useStrictArgumentRefKinds => RefKindExtensions.StrictIn, 872RefKind.RefReadOnlyParameter => RefKind.In,
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
1136case RefKind.RefReadOnlyParameter:
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
588true when requiresLocationAllowed && CustomModifierUtils.HasRequiresLocationAttributeModifier(paramRefCustomMods) => RefKind.RefReadOnlyParameter,
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
78internal override bool IsMetadataIn => RefKind is RefKind.In or RefKind.RefReadOnlyParameter;
Symbols\MemberSignatureComparer.cs (2)
827return (refKind1, refKind2) is (RefKind.RefReadOnlyParameter, RefKind.In) or (RefKind.In, RefKind.RefReadOnlyParameter);
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1130case RefKind.RefReadOnlyParameter: 1158case RefKind.RefReadOnlyParameter:
Symbols\Metadata\PE\PEParameterSymbol.cs (4)
296refKind = RefKind.RefReadOnlyParameter; 401Debug.Assert(parameter.RefKind != RefKind.RefReadOnlyParameter); 404else if (parameter.RefKind is RefKind.In or RefKind.RefReadOnlyParameter) 1083bool filterRequiresLocationAttribute = this.RefKind == RefKind.RefReadOnlyParameter;
Symbols\NamedTypeSymbol.cs (1)
364(thisParam.RefKind is RefKind.In or RefKind.RefReadOnlyParameter && thisParam.Type.TypeKind != TypeKind.Struct))
Symbols\ParameterSymbol.cs (1)
163(refKind is RefKind.In or RefKind.RefReadOnlyParameter) ||
Symbols\ReducedExtensionMethodSymbol.cs (1)
539internal override bool IsEffectivelyReadOnly => _reducedFrom.Parameters[0].RefKind is RefKind.In or RefKind.RefReadOnlyParameter;
Symbols\RefKindExtensions.cs (1)
47case RefKind.RefReadOnlyParameter:
Symbols\Source\ParameterHelpers.cs (5)
93RefKind.RefReadOnlyParameter => CreateRefReadonlyParameterModifiers(binder, diagnostics, syntax), 254else if (parameter.RefKind == RefKind.RefReadOnlyParameter) 855if (refKind == RefKind.RefReadOnlyParameter) 968refKind = RefKind.RefReadOnlyParameter; 988if (addRefReadOnlyModifier && refKind is RefKind.In or RefKind.RefReadOnlyParameter)
Symbols\Source\SourceComplexParameterSymbol.cs (2)
906if (this.RefKind == RefKind.RefReadOnlyParameter && this.IsOptional && this.ParameterSyntax.Default is null) 1423case RefKind.RefReadOnlyParameter:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1406int nRefParameters = parameters.Count(p => p.RefKind is RefKind.Ref or RefKind.In or RefKind.RefReadOnlyParameter or RefKind.Out);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
222else if (parameter0RefKind is RefKind.In or RefKind.RefReadOnlyParameter && parameter0Type.TypeKind != TypeKind.Struct)
Symbols\Source\SourceParameterSymbol.cs (1)
295internal override bool IsMetadataIn => RefKind is RefKind.In or RefKind.RefReadOnlyParameter;
Symbols\Source\SourceParameterSymbolBase.cs (1)
121case RefKind.RefReadOnlyParameter:
Symbols\Synthesized\RefKindVector.cs (2)
50(true, false, false) => RefKind.RefReadOnlyParameter, 63RefKind.RefReadOnlyParameter => (true, false, false),
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
472internal override bool IsMetadataIn => RefKind is RefKind.In or RefKind.RefReadOnlyParameter;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
189case RefKind.RefReadOnlyParameter: 251internal sealed override bool IsMetadataIn => RefKind is RefKind.In or RefKind.RefReadOnlyParameter; 406internal override bool IsMetadataIn => RefKind is RefKind.In or RefKind.RefReadOnlyParameter || _baseParameterForAttributes?.GetDecodedWellKnownAttributeData()?.HasInAttribute == true;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
146RefKind.RefReadOnlyParameter => [RefKeyword, ReadOnlyKeyword],
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
RefReadonlyParameterTests.cs (3)
64Assert.Equal(refKind, RefKind.RefReadOnlyParameter == parameter.RefKind); 7134Assert.Equal(RefKind.RefReadOnlyParameter, methodFromCref!.Parameters.Single().RefKind); 7135var methodFromClass = comp.GetMembers("C.M").Cast<MethodSymbol>().Single(m => m.Parameters.Single().RefKind == RefKind.RefReadOnlyParameter);
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
316RefKind.RefReadOnlyParameter => "ref readonly ",
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\CrefTests.cs (1)
6752Assert.Equal(RefKind.RefReadOnlyParameter, parameterSymbol.RefKind);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
222case RefKind.RefReadOnlyParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
146RefKind.RefReadOnlyParameter => [RefKeyword, ReadOnlyKeyword],
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
331isScoped: symbol is { RefKind: RefKind.Ref or RefKind.In or RefKind.RefReadOnlyParameter, ScopedKind: ScopedKind.ScopedRef }
Microsoft.Interop.SourceGeneration (6)
Marshalling\BreakingChangeDetector.cs (1)
26if (info is { RefKind: RefKind.In or RefKind.RefReadOnlyParameter, MarshallingAttributeInfo: NativeMarshallingAttributeInfo(ManagedTypeInfo { DiagnosticFormattedName: TypeNames.ComVariantMarshaller }, _) }
Marshalling\MarshallerHelpers.cs (5)
107return context.SingleFrameSpansNativeContext && (!info.IsByRef || info.RefKind == RefKind.In || info.RefKind == RefKind.RefReadOnlyParameter); 318case RefKind.RefReadOnlyParameter: 340case RefKind.RefReadOnlyParameter: 436case RefKind.RefReadOnlyParameter: 461RefKind.RefReadOnlyParameter => Token(SyntaxKind.InKeyword),
Microsoft.VisualStudio.LanguageServices (1)
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
198case RefKind.RefReadOnlyParameter:
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
298Dim includedInTest = {RefKind.None, RefKind.Ref, RefKind.Out, RefKind.In, RefKind.RefReadOnly, RefKind.RefReadOnlyParameter}