240 references to In
ILLink.RoslynAnalyzer (1)
TrimAnalysis\ParameterProxy.cs (1)
27
case RefKind.
In
: return ReferenceKind.In;
Microsoft.CodeAnalysis (3)
Symbols\RefKind.cs (3)
58
case RefKind.
In
: return "in";
70
case RefKind.
In
: return "in";
81
case RefKind.
In
: return "in ";
Microsoft.CodeAnalysis.CSharp (106)
Binder\Binder.ValueChecks.cs (6)
1119
if (parameterSymbol.RefKind is RefKind.
In
or RefKind.RefReadOnlyParameter && RequiresAssignableVariable(valueKind))
2350
parameter?.RefKind is RefKind.
In
or RefKind.RefReadOnlyParameter)
5452
resultRefKind = elementAccess.GetItemOrSliceHelper is WellKnownMember.System_ReadOnlySpan_T__get_Item ? RefKind.
In
: RefKind.Ref;
5462
parameterRefKind = elementAccess.GetItemOrSliceHelper is WellKnownMember.System_ReadOnlySpan_T__Slice_Int_Int ? RefKind.
In
: RefKind.Ref;
5507
RefKind parameterRefKind = resultType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions) ? RefKind.
In
: RefKind.Ref;
5738
((BoundParameter)expression).ParameterSymbol.RefKind is not (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_Expressions.cs (5)
3072
var requiredValueKind = origRefKind == RefKind.
In
? BindValueKind.ReadonlyRef : BindValueKind.RefOrOut;
3354
refKind == RefKind.
In
?
3411
if (argRefKind is RefKind.None or RefKind.
In
&&
3425
if (getCorrespondingParameter(in result, parameters, arg).RefKind == RefKind.
In
)
3882
argumentRefKindsBuilder.Add(refKind == RefKind.RefReadOnlyParameter ? RefKind.
In
: refKind);
Binder\Binder_Invocation.cs (2)
565
if (refKinds[argIndex] == RefKind.
In
)
1242
else if (receiverParameter.RefKind == RefKind.
In
)
Binder\ForEachLoopBinder.cs (1)
1203
patternDisposeMethod.ParameterRefKinds.All(static refKind => refKind is RefKind.None or RefKind.
In
or RefKind.RefReadOnlyParameter));
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
1276
if (op1.LeftRefKind == RefKind.None && op2.LeftRefKind == RefKind.
In
)
1280
else if (op2.LeftRefKind == RefKind.None && op1.LeftRefKind == RefKind.
In
)
1289
if (op1.RightRefKind == RefKind.None && op2.RightRefKind == RefKind.
In
)
1300
else if (op2.RightRefKind == RefKind.None && op1.RightRefKind == RefKind.
In
)
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
229
if (op1.RefKind == RefKind.None && op2.RefKind == RefKind.
In
)
233
else if (op2.RefKind == RefKind.None && op1.RefKind == RefKind.
In
)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
2651
RefKind.
In
or RefKind.RefReadOnlyParameter => true,
3870
if (paramRefKind == RefKind.
In
)
3882
else if (paramRefKind == RefKind.RefReadOnlyParameter && argRefKind is RefKind.None or RefKind.Ref or RefKind.
In
)
3918
(RefKind.RefReadOnlyParameter, RefKind.
In
) or
3919
(RefKind.
In
, RefKind.RefReadOnlyParameter))
3925
(candidateMethodParameterRefKind, delegateParameterRefKind) is (RefKind.
In
, RefKind.Ref))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (6)
1195
if (refParameter == RefKind.Ref || refParameter == RefKind.
In
)
1253
!(refArg == RefKind.None && refParameter == RefKind.
In
) &&
1254
!(refArg == RefKind.Ref && refParameter == RefKind.
In
&& binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) &&
1255
!(refParameter == RefKind.RefReadOnlyParameter && refArg is RefKind.None or RefKind.Ref or RefKind.
In
))
1265
else if (refArg == RefKind.Ref && refParameter == RefKind.
In
&& !binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters))
1276
else if (refParameter is RefKind.None or RefKind.
In
or RefKind.RefReadOnlyParameter)
BoundTree\Constructors.cs (4)
194
Debug.Assert(argumentRefKind is RefKind.None or RefKind.Ref or RefKind.
In
or RefKind.Out or RefKindExtensions.StrictIn &&
198
RefKind.
In
=> argumentRefKind == RefKindExtensions.StrictIn,
199
RefKind.RefReadOnlyParameter => argumentRefKind is RefKind.
In
or RefKindExtensions.StrictIn,
240
builder.Add(refKind == RefKind.RefReadOnlyParameter ? RefKind.
In
: refKind);
CodeGen\EmitExpression.cs (4)
723
case RefKind.
In
:
980
RefKind.
In
=> argRefKind == RefKindExtensions.StrictIn,
981
RefKind.RefReadOnlyParameter => argRefKind is RefKind.
In
or RefKindExtensions.StrictIn,
994
RefKind.RefReadOnlyParameter => RefKind.
In
, // should not happen, asserted above
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
701
Debug.Assert(RefKind.RefReadOnly == RefKind.
In
);
FlowAnalysis\AbstractFlowPass.cs (1)
1551
case RefKind.
In
:
FlowAnalysis\NullableWalker.cs (4)
2387
if (refKind is RefKind.None or RefKind.
In
or RefKind.RefReadOnlyParameter)
7301
case RefKind.
In
:
7362
case RefKind.
In
:
7497
case RefKind.
In
:
Lowering\LocalRewriter\LocalRewriter.cs (1)
1128
symbol.Parameters.Any(static p => p.RefKind == RefKind.
In
))
Lowering\LocalRewriter\LocalRewriter_Call.cs (9)
883
local = _factory.StoreToTemp(visitedArgument, out var store, refKind: paramRefKind is RefKind.
In
or RefKind.RefReadOnlyParameter ? RefKind.
In
: argRefKind);
1162
if (paramRefKind is RefKind.
In
or RefKind.RefReadOnlyParameter)
1166
refKindsBuilder[i] = argRefKind == RefKind.None ? RefKind.
In
: RefKindExtensions.StrictIn;
1364
if (paramRefKind is RefKind.
In
or RefKind.RefReadOnlyParameter)
1366
Debug.Assert(argRefKind is RefKind.None or RefKind.
In
or RefKind.Ref);
1367
argRefKind = argRefKind == RefKind.None ? RefKind.
In
: RefKindExtensions.StrictIn;
1388
refKind: paramRefKind is RefKind.
In
or RefKind.RefReadOnlyParameter
1389
? (argRefKind == RefKind.None ? RefKind.
In
: RefKindExtensions.StrictIn)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
273
possiblyRefCapturedReceiver = _factory.StoreToTemp(possiblyRefCapturedReceiver, out var refCapture, createSpan.Parameters[0].RefKind == RefKind.
In
? RefKindExtensions.StrictIn : RefKind.Ref);
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\SpillSequenceSpiller.cs (1)
1076
result = receiver.Type.IsReadOnly ? RefKind.
In
: RefKind.Ref;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
622
if (refKind != RefKind.None && refKind != RefKind.
In
)
642
Debug.Assert(refKind is RefKindExtensions.StrictIn or RefKind.Ref or RefKind.
In
);
Lowering\SyntheticBoundNodeFactory.cs (5)
863
(useStrictArgumentRefKinds && result.Contains(RefKind.
In
))))
871
RefKind.
In
or RefKind.RefReadOnlyParameter when useStrictArgumentRefKinds => RefKindExtensions.StrictIn,
872
RefKind.RefReadOnlyParameter => RefKind.
In
,
1654
case RefKind.
In
:
1663
Debug.Assert(argument.GetRefKind() != RefKind.
In
);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
1132
case RefKind.
In
:
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (4)
312
Debug.Assert(refKind is RefKind.None or RefKind.
In
or RefKind.Ref or RefKind.Out);
316
RefKind.
In
=> compilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_InAttribute),
323
Debug.Assert(refKind != RefKind.Out && refKind != RefKind.
In
);
569
RefKind paramRefKind = getRefKind(param, paramRefCustomMods, RefKind.
In
, RefKind.Out, requiresLocationAllowed: true);
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)
1129
case RefKind.
In
:
1154
case RefKind.
In
:
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
300
refKind = RefKind.
In
;
404
else if (parameter.RefKind is RefKind.
In
or RefKind.RefReadOnlyParameter)
1082
bool filterIsReadOnlyAttribute = this.RefKind == RefKind.
In
;
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
210
var isBad = (result.RefKind == RefKind.
In
) != result.RefCustomModifiers.HasInAttributeModifier();
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 (2)
30
return RefKind.
In
;
46
case RefKind.
In
:
Symbols\Source\ParameterHelpers.cs (4)
92
RefKind.
In
=> CreateInModifiers(binder, diagnostics, syntax),
243
if (parameter.RefKind == RefKind.
In
)
952
refKind = RefKind.
In
;
988
if (addRefReadOnlyModifier && refKind is RefKind.
In
or RefKind.RefReadOnlyParameter)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1416
case RefKind.
In
:
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)
118
case RefKind.
In
:
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
334
if (p.RefKind != RefKind.None && p.RefKind != RefKind.
In
)
Symbols\Source\ThisParameterSymbol.cs (1)
159
return RefKind.
In
;
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (1)
17
this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.
In
, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (1)
17
this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.
In
, "buffer"),
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
17
this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.
In
, "buffer")));
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
472
internal override bool IsMetadataIn => RefKind is RefKind.
In
or RefKind.RefReadOnlyParameter;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
186
case RefKind.
In
:
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 (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
30
SyntaxKind.InKeyword => RefKind.
In
,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
43
if (argumentSyntax == null || argumentSyntax.GetRefKind() != RefKind.
In
)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
144
RefKind.
In
when !forFunctionPointerReturnParameter => [InKeyword],
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (24)
CodeGen\CodeGenFunctionPointersTests.cs (6)
230
(RefKind.
In
, IsSpecialType(SpecialType.System_String)),
231
(RefKind.
In
, IsSpecialType(SpecialType.System_Int32)));
579
(RefKind.
In
, IsSpecialType(SpecialType.System_Int32)));
589
(RefKind.
In
, IsSpecialType(SpecialType.System_Int32)));
658
(RefKind.
In
,
691
(RefKind.
In
, IsSpecialType(SpecialType.System_Int32)));
CodeGen\CodeGenReadonlyStructTests.cs (18)
830
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
831
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
847
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
848
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
854
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
855
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
861
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
862
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
914
Assert.Equal(RefKind.
In
, s1.GetMethod("M1").ThisParameter.RefKind);
915
Assert.Equal(RefKind.
In
, s1.GetMethod("ToString").ThisParameter.RefKind);
1004
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
1005
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
1011
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
1012
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
1018
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
1019
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
1025
Assert.Equal(RefKind.
In
, namedType.GetMethod("M1").ThisParameter.RefKind);
1026
Assert.Equal(RefKind.
In
, namedType.GetMethod("ToString").ThisParameter.RefKind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (24)
Attributes\AttributeTests_RefReadOnly.cs (20)
42
Assert.Equal(RefKind.
In
, parameter.RefKind);
68
Assert.Equal(RefKind.
In
, parameter.RefKind);
124
Assert.Equal(RefKind.
In
, parameter.RefKind);
154
Assert.Equal(RefKind.
In
, parameter.RefKind);
206
Assert.Equal(RefKind.
In
, parameter.RefKind);
233
Assert.Equal(RefKind.
In
, parameter.RefKind);
277
Assert.Equal(RefKind.
In
, parameter.RefKind);
406
Assert.Equal(RefKind.
In
, parameter.RefKind);
426
Assert.Equal(RefKind.
In
, parameter.RefKind);
478
Assert.Equal(RefKind.
In
, parameter.RefKind);
505
Assert.Equal(RefKind.
In
, parameter.RefKind);
522
Assert.Equal(RefKind.
In
, parameter.RefKind);
565
Assert.Equal(RefKind.
In
, parameter.RefKind);
602
Assert.Equal(RefKind.
In
, parameter.RefKind);
626
Assert.Equal(RefKind.
In
, parameter.RefKind);
690
Assert.Equal(RefKind.
In
, parameter.RefKind);
729
Assert.Equal(RefKind.
In
, parameter.RefKind);
757
Assert.Equal(RefKind.
In
, parameter.RefKind);
823
Assert.Equal(RefKind.
In
, parameter.RefKind);
1161
Assert.Equal(RefKind.
In
, parameter.RefKind);
RefReadonlyParameterTests.cs (4)
978
Assert.Equal(RefKind.
In
, p.RefKind);
1127
Assert.Equal(RefKind.
In
, p.RefKind);
1688
Assert.Equal(RefKind.
In
, p.RefKind);
7082
"in" => RefKind.
In
,
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
315
RefKind.
In
=> "in ",
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
95
RefKind.
In
=> "in ",
Completion\Providers\ContextVariableArgumentProvider.cs (1)
46
case RefKind.
In
:
SignatureHelp\LightweightOverloadResolution.cs (1)
139
if (parameterRefKind == RefKind.
In
&& argumentRefKind == RefKind.None)
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
43
if (argumentSyntax == null || argumentSyntax.GetRefKind() != RefKind.
In
)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (45)
Semantics\LambdaTests.cs (1)
6900
Assert.Equal(RefKind.
In
, lambdas[1].Parameters[0].RefKind);
Semantics\RefExtensionMethodsTests.cs (2)
2167
Assert.Equal(RefKind.
In
, symbol.RefKind);
2205
Assert.Equal(RefKind.
In
, symbol.RefKind);
Semantics\RefFieldTests.cs (42)
10927
VerifyParameterSymbol(parameters[0], "in R x3", RefKind.
In
, ScopedKind.None);
10928
VerifyParameterSymbol(parameters[1], "scoped in R y3", RefKind.
In
, ScopedKind.ScopedRef);
10969
VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").GetMethod.Parameters[0], "scoped in System.Object o", RefKind.
In
, ScopedKind.ScopedRef);
11032
VerifyParameterSymbol(localFunctions[2].Parameters[0], "in System.Int32 x3", RefKind.
In
, ScopedKind.None);
11033
VerifyParameterSymbol(localFunctions[2].Parameters[1], "scoped in System.Int32 y3", RefKind.
In
, ScopedKind.ScopedRef);
11038
VerifyParameterSymbol(localFunctions[5].Parameters[0], "in R x6", RefKind.
In
, ScopedKind.None);
11039
VerifyParameterSymbol(localFunctions[5].Parameters[1], "scoped in R y6", RefKind.
In
, ScopedKind.ScopedRef);
11105
verifyParameter(delegateTypesAndLambdas[2], 0, "in System.Int32", "x3", RefKind.
In
, ScopedKind.None, false);
11106
verifyParameter(delegateTypesAndLambdas[2], 1, "scoped in System.Int32", "y3", RefKind.
In
, ScopedKind.ScopedRef, false);
11112
verifyParameter(delegateTypesAndLambdas[5], 0, "in R", "x6", RefKind.
In
, ScopedKind.None, false);
11113
verifyParameter(delegateTypesAndLambdas[5], 1, "scoped in R", "y6", RefKind.
In
, ScopedKind.ScopedRef, false);
11248
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F6").Parameters[0], "scoped in R r", RefKind.
In
, ScopedKind.ScopedRef);
11359
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "in scoped s", RefKind.
In
, ScopedKind.None);
11360
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F7").Parameters[0], "scoped in scoped s", RefKind.
In
, ScopedKind.ScopedRef);
11473
VerifyParameterSymbol(parameters[2], "in R c", RefKind.
In
, ScopedKind.None);
11553
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S1.F2").ThisParameter, "in S1 this", RefKind.
In
, ScopedKind.ScopedRef);
11556
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R1.F2").ThisParameter, "in R1 this", RefKind.
In
, ScopedKind.ScopedRef);
11558
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F1").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
11559
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
11561
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R2.F1").ThisParameter, "in R2 this", RefKind.
In
, ScopedKind.ScopedRef);
11562
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R2.F2").ThisParameter, "in R2 this", RefKind.
In
, ScopedKind.ScopedRef);
11951
VerifyParameterSymbol(method.Parameters[1], "scoped in System.Int32 y", RefKind.
In
, ScopedKind.ScopedRef);
11985
VerifyParameterSymbol(method.Parameters[1], "scoped in System.Int32 y", RefKind.
In
, ScopedKind.ScopedRef);
23213
VerifyParameterSymbol(type.GetMethod("F3").Parameters[0], "in R<T> t3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
23536
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "in System.Int32 t1", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
23537
VerifyParameterSymbol(baseType.GetMethod("F2A").Parameters[0], "scoped in System.Int32 t2", RefKind.
In
, ScopedKind.ScopedRef, expectedHasUnscopedRefAttribute: false);
23538
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "in System.Int32 t3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
23539
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "in System.Int32 t4", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
23656
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "in R<T> r3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24610
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
24611
VerifyParameterSymbol(typeA.GetMethod("ScopedRefOnly").Parameters[0], "scoped in R x", RefKind.
In
, ScopedKind.ScopedRef, expectedHasUnscopedRefAttribute: false);
24612
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24613
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24669
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
24672
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.
In
, ScopedKind.None);
24712
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
24715
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.
In
, ScopedKind.None);
24748
verifyParameter(delegateTypesAndLambdas[3], 0, "in R", "r4", RefKind.
In
, ScopedKind.None);
24798
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F4").Parameters[0], "in modreq(System.Runtime.InteropServices.InAttribute) R", RefKind.
In
, ScopedKind.None);
24860
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "in R r4", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
25476
VerifyParameterSymbol(typeA.GetMethod("F3").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
25477
VerifyParameterSymbol(typeA.GetMethod("F4").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
DocumentationComments\CrefTests.cs (1)
6709
Assert.Equal(RefKind.
In
, parameterSymbol.RefKind);
Symbols\DefaultInterfaceImplementationTests.cs (1)
69333
Assert.Equal(RefKind.
In
, p.RefKind);
Symbols\ExtensionMethodTests.cs (2)
4035
Assert.Equal(RefKind.
In
, parameter.RefKind);
4041
Assert.Equal(RefKind.
In
, parameter.RefKind);
Symbols\FunctionPointerTypeSymbolTests.cs (4)
475
Assert.Equal(RefKind.
In
, secondParam.Parameters.Single().RefKind);
583
Assert.Equal(RefKind.
In
, fourthParam.Parameters.Single().RefKind);
589
Assert.Equal(RefKind.
In
, sixthParam.Parameters.Single().RefKind);
1586
ImmutableArray.Create(RefKind.
In
));
Symbols\Source\DelegateTests.cs (3)
803
Assert.Equal(RefKind.
In
, d.DelegateInvokeMethod.Parameters[0].RefKind);
832
Assert.Equal(RefKind.
In
, lambda.Parameters[0].RefKind);
839
Assert.Equal(RefKind.
In
, lambda.Parameters[0].RefKind);
Symbols\Source\ExpressionBodiedPropertyTests.cs (2)
562
Assert.Equal(RefKind.
In
, p.GetMethod.Parameters[0].RefKind);
590
Assert.Equal(RefKind.
In
, p.GetMethod.Parameters[0].RefKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
FunctionPointerUtilities.cs (1)
314
case RefKind.
In
:
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
216
case RefKind.
In
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
30
SyntaxKind.InKeyword => RefKind.
In
,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
144
RefKind.
In
when !forFunctionPointerReturnParameter => [InKeyword],
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.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
364
if (paramSymbol.RefKind == RefKind.
In
)
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
544
if (paramSymbol.RefKind == RefKind.
In
)
Microsoft.Interop.SourceGeneration (7)
Marshalling\BreakingChangeDetector.cs (1)
26
if (info is { RefKind: RefKind.
In
or RefKind.RefReadOnlyParameter, MarshallingAttributeInfo: NativeMarshallingAttributeInfo(ManagedTypeInfo { DiagnosticFormattedName: TypeNames.ComVariantMarshaller }, _) }
Marshalling\MarshallerHelpers.cs (6)
23
ByValueContentsMarshalKind.In => RefKind.
In
,
107
return context.SingleFrameSpansNativeContext && (!info.IsByRef || info.RefKind == RefKind.
In
|| info.RefKind == RefKind.RefReadOnlyParameter);
317
case RefKind.
In
:
339
case RefKind.
In
:
426
case RefKind.
In
:
458
RefKind.
In
=> Token(SyntaxKind.InKeyword),
Microsoft.VisualStudio.LanguageServices (1)
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
196
case RefKind.
In
:
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
298
Dim includedInTest = {RefKind.None, RefKind.Ref, RefKind.Out, RefKind.
In
, RefKind.RefReadOnly, RefKind.RefReadOnlyParameter}