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