190 references to In
Microsoft.CodeAnalysis (4)
Symbols\RefKind.cs (4)
53
case RefKind.
In
: return "in";
64
case RefKind.
In
: return "in";
75
case RefKind.
In
: return "in ";
86
internal const RefKind StrictIn = RefKind.
In
+ 1;
Microsoft.CodeAnalysis.CSharp (71)
Binder\Binder.ValueChecks.cs (4)
923
if (parameterSymbol.RefKind == RefKind.
In
&& RequiresAssignableVariable(valueKind))
2139
parameter?.RefKind == RefKind.
In
)
2141
refKind = RefKind.
In
;
4630
((BoundParameter)expression).ParameterSymbol.RefKind != RefKind.
In
;
Binder\Binder_Attributes.cs (1)
239
if (attributeConstructor.Parameters.Any(static p => p.RefKind == RefKind.
In
))
Binder\Binder_Expressions.cs (2)
2856
var requiredValueKind = origRefKind == RefKind.
In
? BindValueKind.ReadonlyRef : BindValueKind.RefOrOut;
3138
refKind == RefKind.
In
?
Binder\Binder_Invocation.cs (2)
457
if (refKinds[argIndex] == RefKind.
In
)
1070
else if (receiverParameter.RefKind == RefKind.
In
)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
1251
if (op1.LeftRefKind == RefKind.None && op2.LeftRefKind == RefKind.
In
)
1255
else if (op2.LeftRefKind == RefKind.None && op1.LeftRefKind == RefKind.
In
)
1264
if (op1.RightRefKind == RefKind.None && op2.RightRefKind == RefKind.
In
)
1275
else if (op2.RightRefKind == RefKind.None && op1.RightRefKind == RefKind.
In
)
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
227
if (op1.RefKind == RefKind.None && op2.RefKind == RefKind.
In
)
231
else if (op2.RefKind == RefKind.None && op1.RefKind == RefKind.
In
)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2195
RefKind.
In
=> true,
3193
if (!isMethodGroupConversion && argRefKind == RefKind.None && paramRefKind == RefKind.
In
)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (3)
1160
if (refParameter == RefKind.Ref || refParameter == RefKind.
In
)
1213
else if (refArg != refParameter && !(refArg == RefKind.None && refParameter == RefKind.
In
))
1215
if (refParameter == RefKind.None || refParameter == RefKind.
In
)
CodeGen\EmitExpression.cs (2)
711
case RefKind.
In
:
961
argRefKind == RefKindExtensions.StrictIn && parameters[i].RefKind == RefKind.
In
,
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
905
Debug.Assert(RefKind.RefReadOnly == RefKind.
In
);
FlowAnalysis\NullableWalker.cs (4)
2320
if (refKind == RefKind.None || refKind == RefKind.
In
)
6507
case RefKind.
In
:
6568
case RefKind.
In
:
6703
case RefKind.
In
:
Lowering\LocalRewriter\LocalRewriter.cs (1)
998
symbol.Parameters.Any(static p => p.RefKind == RefKind.
In
))
Lowering\LocalRewriter\LocalRewriter_Call.cs (8)
640
local = _factory.StoreToTemp(visitedArgument, out var store, refKind: paramRefKind == RefKind.
In
? RefKind.
In
: argRefKind);
899
if (paramRefKind == RefKind.
In
)
1114
refKind: paramRefKind == RefKind.
In
? RefKind.
In
: argRefKind);
1125
if (paramRefKind == RefKind.
In
)
1127
Debug.Assert(argRefKind == RefKind.None || argRefKind == RefKind.
In
);
1128
argRefKind = argRefKind == RefKind.None ? RefKind.
In
: RefKindExtensions.StrictIn;
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
148
.All(p => p.RefKind == RefKind.None || p.RefKind == RefKind.
In
));
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
501
Debug.Assert(method.ParameterRefKinds.IsDefaultOrEmpty || method.ParameterRefKinds[0] is RefKind.
In
or RefKind.None);
Lowering\SpillSequenceSpiller.cs (1)
1005
result = receiver.Type.IsReadOnly ? RefKind.
In
: RefKind.Ref;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
606
if (refKind != RefKind.None && refKind != RefKind.
In
)
Lowering\SyntheticBoundNodeFactory.cs (2)
1530
case RefKind.
In
:
1539
Debug.Assert(argument.GetRefKind() != RefKind.
In
);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
1142
case RefKind.
In
:
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
314
RefKind.
In
=> compilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_InAttribute),
321
Debug.Assert(refKind != RefKind.Out && refKind != RefKind.
In
);
567
RefKind paramRefKind = getRefKind(param, paramRefCustomMods, RefKind.
In
, RefKind.Out);
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
77
internal override bool IsMetadataIn => RefKind == RefKind.
In
;
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1086
case RefKind.
In
:
1110
case RefKind.
In
:
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
285
refKind = RefKind.
In
;
388
else if (parameter.RefKind == RefKind.
In
)
1038
bool filterIsReadOnlyAttribute = this.RefKind == RefKind.
In
;
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
145
var isBad = (result.RefKind == RefKind.
In
) != result.RefCustomModifiers.HasInAttributeModifier();
Symbols\NamedTypeSymbol.cs (1)
367
(thisParam.RefKind == RefKind.
In
&& thisParam.Type.TypeKind != TypeKind.Struct))
Symbols\ParameterSymbol.cs (1)
154
(refKind == RefKind.
In
) ||
Symbols\ReducedExtensionMethodSymbol.cs (1)
531
internal override bool IsEffectivelyReadOnly => _reducedFrom.Parameters[0].RefKind == RefKind.
In
;
Symbols\RefKindExtensions.cs (2)
30
return RefKind.
In
;
46
case RefKind.
In
:
Symbols\Source\ParameterHelpers.cs (4)
91
RefKind.
In
=> CreateInModifiers(binder, diagnostics, syntax),
240
if (parameter.RefKind == RefKind.
In
)
919
refKind = RefKind.
In
;
949
if (addRefReadOnlyModifier && refKind == RefKind.
In
)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1407
case RefKind.
In
:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1407
int nRefParameters = parameters.Count(p => p.RefKind is RefKind.Ref or RefKind.
In
or RefKind.Out);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
235
else if (parameter0RefKind == RefKind.
In
&& parameter0Type.TypeKind != TypeKind.Struct)
Symbols\Source\SourceParameterSymbol.cs (1)
287
internal override bool IsMetadataIn => RefKind == RefKind.
In
;
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
331
if (p.RefKind != RefKind.None && p.RefKind != RefKind.
In
)
Symbols\Source\ThisParameterSymbol.cs (1)
51
return RefKind.
In
;
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
472
internal override bool IsMetadataIn => RefKind == RefKind.
In
;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
231
internal sealed override bool IsMetadataIn => RefKind == RefKind.
In
;
384
internal override bool IsMetadataIn => RefKind == RefKind.
In
|| _baseParameterForAttributes?.GetDecodedWellKnownAttributeData()?.HasInAttribute == true;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
ArgumentSyntaxExtensions.cs (1)
30
SyntaxKind.InKeyword => RefKind.
In
,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpSyntaxGeneratorInternal.cs (1)
129
RefKind.
In
when !forFunctionPointerReturnParameter => SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.InKeyword)),
RemoveInKeywordCodeFixProvider.cs (1)
48
if (argumentSyntax == null || argumentSyntax.GetRefKind() != RefKind.
In
)
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.Emit2.UnitTests (20)
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);
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
321
RefKind.
In
=> "in ",
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
95
RefKind.
In
=> "in ",
Completion\Providers\ContextVariableArgumentProvider.cs (1)
46
case RefKind.
In
:
RemoveInKeywordCodeFixProvider.cs (1)
48
if (argumentSyntax == null || argumentSyntax.GetRefKind() != RefKind.
In
)
SignatureHelp\AbstractCSharpSignatureHelpProvider.LightweightOverloadResolution.cs (1)
174
if (parameterRefKind == RefKind.
In
&& argumentRefKind == RefKind.None)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (45)
Semantics\LambdaTests.cs (1)
6866
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)
10477
VerifyParameterSymbol(parameters[0], "in R x3", RefKind.
In
, ScopedKind.None);
10478
VerifyParameterSymbol(parameters[1], "scoped in R y3", RefKind.
In
, ScopedKind.ScopedRef);
10519
VerifyParameterSymbol(comp.GetMember<PropertySymbol>("A.this[]").GetMethod.Parameters[0], "scoped in System.Object o", RefKind.
In
, ScopedKind.ScopedRef);
10582
VerifyParameterSymbol(localFunctions[2].Parameters[0], "in System.Int32 x3", RefKind.
In
, ScopedKind.None);
10583
VerifyParameterSymbol(localFunctions[2].Parameters[1], "scoped in System.Int32 y3", RefKind.
In
, ScopedKind.ScopedRef);
10588
VerifyParameterSymbol(localFunctions[5].Parameters[0], "in R x6", RefKind.
In
, ScopedKind.None);
10589
VerifyParameterSymbol(localFunctions[5].Parameters[1], "scoped in R y6", RefKind.
In
, ScopedKind.ScopedRef);
10655
verifyParameter(delegateTypesAndLambdas[2], 0, "in System.Int32", "x3", RefKind.
In
, ScopedKind.None, false);
10656
verifyParameter(delegateTypesAndLambdas[2], 1, "scoped in System.Int32", "y3", RefKind.
In
, ScopedKind.ScopedRef, false);
10662
verifyParameter(delegateTypesAndLambdas[5], 0, "in R", "x6", RefKind.
In
, ScopedKind.None, false);
10663
verifyParameter(delegateTypesAndLambdas[5], 1, "scoped in R", "y6", RefKind.
In
, ScopedKind.ScopedRef, false);
10798
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F6").Parameters[0], "scoped in R r", RefKind.
In
, ScopedKind.ScopedRef);
10910
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F5").Parameters[0], "in scoped s", RefKind.
In
, ScopedKind.None);
10911
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F7").Parameters[0], "scoped in scoped s", RefKind.
In
, ScopedKind.ScopedRef);
11024
VerifyParameterSymbol(parameters[2], "in R c", RefKind.
In
, ScopedKind.None);
11104
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S1.F2").ThisParameter, "in S1 this", RefKind.
In
, ScopedKind.ScopedRef);
11107
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R1.F2").ThisParameter, "in R1 this", RefKind.
In
, ScopedKind.ScopedRef);
11109
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F1").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
11110
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
11112
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R2.F1").ThisParameter, "in R2 this", RefKind.
In
, ScopedKind.ScopedRef);
11113
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("R2.F2").ThisParameter, "in R2 this", RefKind.
In
, ScopedKind.ScopedRef);
11458
VerifyParameterSymbol(method.Parameters[1], "scoped in System.Int32 y", RefKind.
In
, ScopedKind.ScopedRef);
11492
VerifyParameterSymbol(method.Parameters[1], "scoped in System.Int32 y", RefKind.
In
, ScopedKind.ScopedRef);
22673
VerifyParameterSymbol(type.GetMethod("F3").Parameters[0], "in R<T> t3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
22996
VerifyParameterSymbol(baseType.GetMethod("F1A").Parameters[0], "in System.Int32 t1", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
22997
VerifyParameterSymbol(baseType.GetMethod("F2A").Parameters[0], "scoped in System.Int32 t2", RefKind.
In
, ScopedKind.ScopedRef, expectedHasUnscopedRefAttribute: false);
22998
VerifyParameterSymbol(baseType.GetMethod("F3A").Parameters[0], "in System.Int32 t3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
22999
VerifyParameterSymbol(baseType.GetMethod("F4A").Parameters[0], "in System.Int32 t4", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
23116
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F3").Parameters[0], "in R<T> r3", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24070
VerifyParameterSymbol(typeA.GetMethod("NoAttributes").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
24071
VerifyParameterSymbol(typeA.GetMethod("ScopedRefOnly").Parameters[0], "scoped in R x", RefKind.
In
, ScopedKind.ScopedRef, expectedHasUnscopedRefAttribute: false);
24072
VerifyParameterSymbol(typeA.GetMethod("UnscopedRefOnly").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24073
VerifyParameterSymbol(typeA.GetMethod("ScopedRefAndUnscopedRef").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24129
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
24132
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.
In
, ScopedKind.None);
24172
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("S2.F2").ThisParameter, "in S2 this", RefKind.
In
, ScopedKind.ScopedRef);
24175
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("A.F5").Parameters[0], "in R r5", RefKind.
In
, ScopedKind.None);
24208
verifyParameter(delegateTypesAndLambdas[3], 0, "in R", "r4", RefKind.
In
, ScopedKind.None);
24258
VerifyParameterSymbol(getFunctionPointerMethod(comp, "A.F4").Parameters[0], "in modreq(System.Runtime.InteropServices.InAttribute) R", RefKind.
In
, ScopedKind.None);
24320
VerifyParameterSymbol(comp.GetMember<MethodSymbol>("Program.F4").Parameters[0], "in R r4", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
24936
VerifyParameterSymbol(typeA.GetMethod("F3").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: false);
24937
VerifyParameterSymbol(typeA.GetMethod("F4").Parameters[0], "in R x", RefKind.
In
, ScopedKind.None, expectedHasUnscopedRefAttribute: true);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
DocumentationComments\CrefTests.cs (1)
6708
Assert.Equal(RefKind.
In
, parameterSymbol.RefKind);
Symbols\ExtensionMethodTests.cs (2)
4041
Assert.Equal(RefKind.
In
, parameter.RefKind);
4047
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);
1592
ImmutableArray.Create(RefKind.
In
));
Symbols\Source\DelegateTests.cs (3)
804
Assert.Equal(RefKind.
In
, d.DelegateInvokeMethod.Parameters[0].RefKind);
833
Assert.Equal(RefKind.
In
, lambda.Parameters[0].RefKind);
840
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)
312
case RefKind.
In
:
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
ArgumentSyntaxExtensions.cs (1)
30
SyntaxKind.InKeyword => RefKind.
In
,
CodeGeneration\CSharpSyntaxGenerator.cs (1)
216
case RefKind.
In
:
CSharpSyntaxGeneratorInternal.cs (1)
129
RefKind.
In
when !forFunctionPointerReturnParameter => SyntaxFactory.TokenList(SyntaxFactory.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}