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