133 implementations of Kind
Microsoft.CodeAnalysis (132)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
770 references to Kind
ILLink.RoslynAnalyzer (8)
Metrics (24)
Metrics.Legacy (24)
Microsoft.Analyzers.Extra (8)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Mvc.Analyzers (4)
Microsoft.AspNetCore.Mvc.Api.Analyzers (8)
Microsoft.CodeAnalysis (85)
Microsoft.CodeAnalysis.Analyzers (27)
Microsoft.CodeAnalysis.AnalyzerUtilities (62)
Microsoft.CodeAnalysis.BannedApiAnalyzers (25)
Microsoft.CodeAnalysis.CodeStyle (35)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
64switch (operation.Kind)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (67)
Semantics\PrimaryConstructorTests.cs (32)
4516Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4519Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4527Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4530Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4533Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
4541Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4544Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4547Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
4549Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
4556Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
4650Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4653Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4663Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4666Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4669Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
4679Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4682Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4685Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
4687Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
4696Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
4724Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4727Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4735Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4738Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4741Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
4749Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
4752Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
4755Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
4757Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
4764Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
5791Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
5794Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
Semantics\RecordTests.cs (30)
27083Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27086Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27094Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27097Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27100Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
27108Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27111Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27114Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
27116Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
27123Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
27217Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27220Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27230Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27233Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27236Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
27246Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27249Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27252Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
27254Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
27263Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
27291Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27294Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27302Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27305Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27308Assert.Equal(OperationKind.Invocation, context.OperationBlocks[2].Kind);
27316Assert.Equal(OperationKind.ParameterInitializer, context.OperationBlocks[0].Kind);
27319Assert.Equal(OperationKind.Attribute, context.OperationBlocks[1].Kind);
27322Assert.Equal(OperationKind.Block, context.OperationBlocks[2].Kind);
27324Assert.Equal(OperationKind.Invocation, context.OperationBlocks[3].Kind);
27331Assert.Equal(OperationKind.Block, context.OperationBlocks[0].Kind);
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (16)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.Features (29)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
144return op.Kind;
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (24)
Microsoft.CodeAnalysis.Test.Utilities (201)
Compilation\TestOperationVisitor.cs (140)
39Assert.Equal(OperationKind.None, operation.Kind);
55Assert.Equal(OperationKind.None, operation.Kind);
119Assert.Equal(OperationKind.Block, operation.Kind);
127Assert.Equal(OperationKind.VariableDeclarationGroup, operation.Kind);
133Assert.Equal(OperationKind.VariableDeclarator, operation.Kind);
148Assert.Equal(OperationKind.VariableDeclaration, operation.Kind);
162Assert.Equal(OperationKind.Switch, operation.Kind);
170Assert.Equal(OperationKind.SwitchCase, operation.Kind);
222Assert.Equal(OperationKind.CaseClause, operation.Kind);
359Assert.Equal(OperationKind.Loop, operation.Kind);
367Assert.Equal(OperationKind.Labeled, operation.Kind);
382Assert.Equal(OperationKind.Branch, operation.Kind);
401Assert.Equal(OperationKind.Empty, operation.Kind);
407Assert.Contains(operation.Kind, new[] { OperationKind.Return, OperationKind.YieldReturn, OperationKind.YieldBreak });
410Assert.NotEqual(OperationKind.YieldReturn, operation.Kind);
421Assert.Equal(OperationKind.Lock, operation.Kind);
427Assert.Equal(OperationKind.Try, operation.Kind);
441Assert.Equal(OperationKind.CatchClause, operation.Kind);
462Assert.Equal(OperationKind.Using, operation.Kind);
465Assert.NotEqual(OperationKind.VariableDeclaration, operation.Resources.Kind);
466Assert.NotEqual(OperationKind.VariableDeclarator, operation.Resources.Kind);
482Assert.Equal(OperationKind.None, operation.Kind);
489Assert.Equal(OperationKind.CollectionExpression, operation.Kind);
495Assert.Equal(OperationKind.Spread, operation.Kind);
501Assert.Equal(OperationKind.None, operation.Kind);
507Assert.Equal(OperationKind.ExpressionStatement, operation.Kind);
513Assert.Equal(OperationKind.None, operation.Kind);
519Assert.Equal(OperationKind.Stop, operation.Kind);
525Assert.Equal(OperationKind.End, operation.Kind);
531Assert.Equal(OperationKind.Invocation, operation.Kind);
564Assert.Equal(OperationKind.FunctionPointerInvocation, operation.Kind);
578Assert.Equal(OperationKind.Argument, operation.Kind);
594Assert.Equal(OperationKind.OmittedArgument, operation.Kind);
600Assert.Equal(OperationKind.ArrayElementReference, operation.Kind);
606Assert.Equal(OperationKind.ImplicitIndexerReference, operation.Kind);
615Assert.Equal(OperationKind.InlineArrayAccess, operation.Kind);
621Assert.Equal(OperationKind.None, operation.Kind);
627Assert.Equal(OperationKind.LocalReference, operation.Kind);
635Assert.Equal(OperationKind.ParameterReference, operation.Kind);
642Assert.Equal(OperationKind.InstanceReference, operation.Kind);
681Assert.Equal(OperationKind.FieldReference, operation.Kind);
691Assert.Equal(OperationKind.MethodReference, operation.Kind);
705Assert.Equal(OperationKind.PropertyReference, operation.Kind);
713Assert.Equal(OperationKind.EventReference, operation.Kind);
721Assert.Equal(OperationKind.EventAssignment, operation.Kind);
728Assert.Equal(OperationKind.ConditionalAccess, operation.Kind);
735Assert.Equal(OperationKind.ConditionalAccessInstance, operation.Kind);
741Assert.Equal(OperationKind.None, operation.Kind);
747Assert.Equal(OperationKind.UnaryOperator, operation.Kind);
748Assert.Equal(OperationKind.Unary, operation.Kind);
762Assert.Equal(OperationKind.BinaryOperator, operation.Kind);
763Assert.Equal(OperationKind.Binary, operation.Kind);
831Assert.Equal(OperationKind.TupleBinaryOperator, operation.Kind);
832Assert.Equal(OperationKind.TupleBinary, operation.Kind);
840Assert.Equal(OperationKind.Conversion, operation.Kind);
888Assert.Equal(OperationKind.Conditional, operation.Kind);
903Assert.Equal(OperationKind.Coalesce, operation.Kind);
910Assert.Equal(OperationKind.CoalesceAssignment, operation.Kind);
916Assert.Equal(OperationKind.IsType, operation.Kind);
924Assert.Equal(OperationKind.SizeOf, operation.Kind);
931Assert.Equal(OperationKind.TypeOf, operation.Kind);
938Assert.Equal(OperationKind.AnonymousFunction, operation.Kind);
945Assert.Equal(OperationKind.FlowAnonymousFunction, operation.Kind);
952Assert.Equal(OperationKind.LocalFunction, operation.Kind);
978Assert.Equal(OperationKind.Literal, operation.Kind);
984Assert.Equal(OperationKind.Utf8String, operation.Kind);
991Assert.Equal(OperationKind.Await, operation.Kind);
997Assert.Equal(OperationKind.NameOf, operation.Kind);
1003Assert.Equal(OperationKind.Throw, operation.Kind);
1016Assert.Equal(OperationKind.AddressOf, operation.Kind);
1022Assert.Equal(OperationKind.ObjectCreation, operation.Kind);
1047Assert.Equal(OperationKind.AnonymousObjectCreation, operation.Kind);
1054Assert.Equal(OperationKind.InstanceReference, propertyReference.Instance.Kind);
1061Assert.Equal(OperationKind.DynamicObjectCreation, operation.Kind);
1074Assert.Equal(OperationKind.DynamicInvocation, operation.Kind);
1080Assert.Equal(OperationKind.DynamicIndexerAccess, operation.Kind);
1086Assert.Equal(OperationKind.ObjectOrCollectionInitializer, operation.Kind);
1092Assert.Equal(OperationKind.MemberInitializer, operation.Kind);
1104Assert.Equal(OperationKind.FieldInitializer, operation.Kind);
1114Assert.Equal(OperationKind.VariableInitializer, operation.Kind);
1121Assert.Equal(OperationKind.PropertyInitializer, operation.Kind);
1131Assert.Equal(OperationKind.ParameterInitializer, operation.Kind);
1138Assert.Equal(OperationKind.ArrayCreation, operation.Kind);
1151Assert.Equal(OperationKind.ArrayInitializer, operation.Kind);
1163Assert.Equal(OperationKind.SimpleAssignment, operation.Kind);
1170Assert.Equal(OperationKind.CompoundAssignment, operation.Kind);
1199Assert.Contains(operation.Kind, new[] { OperationKind.Increment, OperationKind.Decrement });
1211Assert.Equal(OperationKind.Parenthesized, operation.Kind);
1217Assert.Equal(OperationKind.DynamicMemberReference, operation.Kind);
1239Assert.Equal(OperationKind.DefaultValue, operation.Kind);
1245Assert.Equal(OperationKind.TypeParameterObjectCreation, operation.Kind);
1258Assert.Equal(OperationKind.None, operation.Kind);
1271Assert.Equal(OperationKind.Invalid, operation.Kind);
1276Assert.Equal(OperationKind.Tuple, operation.Kind);
1283Assert.Equal(OperationKind.InterpolatedString, operation.Kind);
1289Assert.Equal(OperationKind.InterpolatedStringText, operation.Kind);
1290if (operation.Text.Kind != OperationKind.Literal)
1292Assert.Equal(OperationKind.Literal, ((IConversionOperation)operation.Text).Operand.Kind);
1299Assert.Equal(OperationKind.Interpolation, operation.Kind);
1308if (operation.FormatString.Kind != OperationKind.Literal)
1310Assert.Equal(OperationKind.Literal, ((IConversionOperation)operation.FormatString).Operand.Kind);
1320Assert.Equal(OperationKind.InterpolatedStringHandlerCreation, operation.Kind);
1331Assert.Equal(OperationKind.InterpolatedStringAddition, operation.Kind);
1339Assert.Equal(OperationKind.InterpolatedStringHandlerArgumentPlaceholder, operation.Kind);
1353Assert.True(operation.Kind is OperationKind.InterpolatedStringAppendFormatted or OperationKind.InterpolatedStringAppendLiteral or OperationKind.InterpolatedStringAppendInvalid);
1367Assert.Equal(OperationKind.ConstantPattern, operation.Kind);
1374Assert.Equal(OperationKind.RelationalPattern, operation.Kind);
1387Assert.Equal(OperationKind.BinaryPattern, operation.Kind);
1398Assert.Equal(OperationKind.NegatedPattern, operation.Kind);
1405Assert.Equal(OperationKind.TypePattern, operation.Kind);
1413Assert.Equal(OperationKind.DeclarationPattern, operation.Kind);
1446Assert.Equal(OperationKind.SlicePattern, operation.Kind);
1461Assert.Equal(OperationKind.ListPattern, operation.Kind);
1479Assert.Equal(OperationKind.RecursivePattern, operation.Kind);
1527if (operation.Member.Kind == OperationKind.Invalid)
1551Assert.Equal(OperationKind.SwitchExpression, operation.Kind);
1573Assert.Equal(OperationKind.IsPattern, operation.Kind);
1595Assert.Equal(OperationKind.TranslatedQuery, operation.Kind);
1601Assert.Equal(OperationKind.DeclarationExpression, operation.Kind);
1607Assert.Equal(OperationKind.DeconstructionAssignment, operation.Kind);
1613Assert.Equal(OperationKind.DelegateCreation, operation.Kind);
1619Assert.Equal(OperationKind.RaiseEvent, operation.Kind);
1632Assert.Equal(OperationKind.ConstructorBodyOperation, operation.Kind);
1633Assert.Equal(OperationKind.ConstructorBody, operation.Kind);
1659Assert.Equal(OperationKind.MethodBodyOperation, operation.Kind);
1660Assert.Equal(OperationKind.MethodBody, operation.Kind);
1685Assert.Equal(OperationKind.Discard, operation.Kind);
1694Assert.Equal(OperationKind.DiscardPattern, operation.Kind);
1701Assert.Equal(OperationKind.FlowCapture, operation.Kind);
1705switch (operation.Value.Kind)
1718Assert.False(true, $"A {operation.Value.Kind} node should not be spilled or captured.");
1733Assert.Equal(OperationKind.FlowCaptureReference, operation.Kind);
1740Assert.Equal(OperationKind.IsNull, operation.Kind);
1747Assert.Equal(OperationKind.CaughtException, operation.Kind);
1754Assert.Equal(OperationKind.StaticLocalInitializationSemaphore, operation.Kind);
1763Assert.Equal(OperationKind.Range, operation.Kind);
1784Assert.Equal(OperationKind.ReDim, operation.Kind);
1791Assert.Equal(OperationKind.ReDimClause, operation.Kind);
1818Assert.Equal(OperationKind.With, operation.Kind);
1826Assert.Equal(OperationKind.Attribute, operation.Kind);
Microsoft.CodeAnalysis.Workspaces (17)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
64switch (operation.Kind)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (4)
Roslyn.Diagnostics.Analyzers (28)
System.Private.CoreLib.Generators (2)
Test.Utilities (16)
Text.Analyzers (24)