121 references to Kind
Microsoft.CodeAnalysis (5)
Symbols\Attributes\UnmanagedCallersOnlyAttributeData.cs (2)
37&& value.Kind == TypedConstantKind.Array 38&& (value.Values.IsDefaultOrEmpty || value.Values.All(v => v.Kind == TypedConstantKind.Type));
Symbols\TypedConstant.cs (3)
97if (Kind == TypedConstantKind.Array) 113if (Kind != TypedConstantKind.Array) 213Hash.Combine(_type, (int)this.Kind));
Microsoft.CodeAnalysis.CodeStyle (3)
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
828attribute.ConstructorArguments is [_, { Kind: TypedConstantKind.Primitive, Value: string checkId }, ..]) 839Kind: TypedConstantKind.Primitive,
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
590attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }])
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Attributes.cs (5)
725if (reorderedArgument.Kind == TypedConstantKind.Error) 729else if (reorderedArgument.Kind == TypedConstantKind.Array && 744if (expanded && reorderedArguments[^1].Kind == TypedConstantKind.Error) 751Debug.Assert(hasErrors || reorderedArguments.All(arg => arg.Kind != TypedConstantKind.Error)); 818if (argument.Kind != TypedConstantKind.Array)
Emitter\Model\AttributeDataAdapter.cs (2)
30Debug.Assert(argument.Kind != TypedConstantKind.Error); 106switch (argument.Kind)
Symbols\Attributes\AttributeData.cs (8)
281if (value.Kind != TypedConstantKind.Array) 332if (value.Kind != TypedConstantKind.Array) 597Debug.Assert(ctorArgument.Kind == TypedConstantKind.Enum || ctorArgument.Kind == TypedConstantKind.Primitive); 599ClassInterfaceType interfaceType = ctorArgument.Kind == TypedConstantKind.Enum ? 623Debug.Assert(ctorArgument.Kind == TypedConstantKind.Enum || ctorArgument.Kind == TypedConstantKind.Primitive); 625ComInterfaceType interfaceType = ctorArgument.Kind == TypedConstantKind.Enum ?
Symbols\MethodSymbol.cs (1)
1002Debug.Assert(callConvTypedConstant.Kind == TypedConstantKind.Type);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
1265if (oldConstant.Kind == TypedConstantKind.Array) 1281if ((oldConstant.Kind == TypedConstantKind.Type) && (oldConstantValue != null)) 1293return new TypedConstant(newConstantType, oldConstant.Kind, newConstantValue);
Symbols\Source\SourceComplexParameterSymbol.cs (2)
962SpecialType specialType = arg.Kind == TypedConstantKind.Enum ? 971if (arg.Kind != TypedConstantKind.Array && arg.ValueInternal == null)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1258Debug.Assert(argument.Kind == TypedConstantKind.Type);
Symbols\SymbolExtensions.cs (1)
832&& attr.CommonConstructorArguments[0].Kind == TypedConstantKind.Type)
Symbols\TypedConstantExtensions.cs (6)
25if (constant.Kind == TypedConstantKind.Array) 30if (constant.Kind == TypedConstantKind.Type || constant.TypeInternal!.SpecialType == SpecialType.System_Object) 36if (constant.Kind == TypedConstantKind.Enum) 49Debug.Assert(constant.Kind == TypedConstantKind.Enum); 69Debug.Assert(constant.Kind == TypedConstantKind.Enum); 148Debug.Assert(constant.Kind == TypedConstantKind.Enum);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
ExpressionGenerator.cs (1)
27switch (typedConstant.Kind)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Attributes\AttributeTests.cs (1)
685Assert.Equal(TypedConstantKind.Error, attrs[0].ConstructorArguments.Single().Kind);
Attributes\AttributeTests_Dynamic.cs (2)
541Assert.Equal(TypedConstantKind.Array, argument.Kind); 550Assert.Equal(TypedConstantKind.Primitive, actualTransformFlag.Kind);
Attributes\AttributeTests_Tuples.cs (1)
638Assert.Equal(TypedConstantKind.Array, arg.Kind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\TypedConstantTests.cs (8)
49Assert.Equal(common.Kind, lang.Kind); 53Assert.Equal(common.Kind, common2.Kind); 63Assert.Equal(commonArray.Kind, langArray.Kind); 67Assert.Equal(commonArray.Kind, commonArray2.Kind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Extensions.cs (3)
369Assert.Equal(kind, arg.Kind); 378Assert.Equal(arg.Kind, kind); 384switch (arg.Kind)
TestAttributesVisitor.cs (1)
189if (value.Kind == TypedConstantKind.Array)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Metadata\WinMdDumpTest.cs (2)
290switch (constant.Kind) 335throw ExceptionUtilities.UnexpectedValue(constant.Kind);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
ExpressionGenerator.cs (1)
27switch (typedConstant.Kind)
Microsoft.CodeAnalysis.Features (7)
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
828attribute.ConstructorArguments is [_, { Kind: TypedConstantKind.Primitive, Value: string checkId }, ..]) 839Kind: TypedConstantKind.Primitive,
AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
590attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }])
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
6027=> x.Kind.Equals(y.Kind) && 6030x.Kind switch
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
360if (argument.Kind != TypedConstantKind.Primitive || argument.Value is not string argString)
Microsoft.CodeAnalysis.VisualBasic (28)
Emit\AttributeDataAdapter.vb (1)
70Select Case argument.Kind
Symbols\Attributes\AttributeData.vb (9)
441Debug.Assert(ctorArgument.Kind = TypedConstantKind.Enum OrElse ctorArgument.Kind = TypedConstantKind.Primitive) 443Dim interfaceType As ClassInterfaceType = If(ctorArgument.Kind = TypedConstantKind.Enum, 468Debug.Assert(ctorArgument.Kind = TypedConstantKind.Enum OrElse ctorArgument.Kind = TypedConstantKind.Primitive) 470interfaceType = If(ctorArgument.Kind = TypedConstantKind.Enum, 486Debug.Assert(ctorArgument.Kind = TypedConstantKind.Enum OrElse ctorArgument.Kind = TypedConstantKind.Primitive) 488Return If(ctorArgument.Kind = TypedConstantKind.Enum,
Symbols\Retargeting\RetargetingSymbolTranslator.vb (3)
736If oldConstant.Kind = TypedConstantKind.Array Then 748If (oldConstant.Kind = TypedConstantKind.Type) AndAlso (oldConstantValue IsNot Nothing) Then 756Return New TypedConstant(newConstantType, oldConstant.Kind, newConstantValue)
Symbols\Source\SourceMemberMethodSymbol.vb (1)
1013If arg.Kind <> TypedConstantKind.Array AndAlso CInt(arg.ValueInternal) = DESIGNERSERIALIZATIONVISIBILITYTYPE_CONTENT Then
Symbols\Source\SourceNamedTypeSymbol.vb (2)
2193If attrData.CommonConstructorArguments.Length = 1 AndAlso attrData.CommonConstructorArguments(0).Kind = TypedConstantKind.Primitive Then 2210Debug.Assert(argument.Kind = TypedConstantKind.Type)
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (5)
41Dim strVal As String = If(args(0).Kind <> TypedConstantKind.Array, TryCast(args(0).ValueInternal, String), Nothing) 48strVal = If(args(1).Kind <> TypedConstantKind.Array, TryCast(args(1).ValueInternal, String), Nothing) 54strVal = If(args(2).Kind <> TypedConstantKind.Array, TryCast(args(2).ValueInternal, String), Nothing) 311Dim value As Object = If(typedValue.Kind <> TypedConstantKind.Array, typedValue.ValueInternal, Nothing) 485Dim value As Object = If(typedValue.Kind <> TypedConstantKind.Array, typedValue.ValueInternal, Nothing)
Symbols\Source\SourceParameterSymbol.vb (3)
284Dim newArgs = ImmutableArray.Create(New TypedConstant(oldTypedConstant.TypeInternal, oldTypedConstant.Kind, correctedParameterName)) 421Dim specialType = If(arg.Kind = TypedConstantKind.Enum, 427If arg.Kind <> TypedConstantKind.Array AndAlso
Symbols\TypedConstant.vb (4)
33If constant.Kind = TypedConstantKind.Array Then 37If constant.Kind = TypedConstantKind.Type OrElse constant.TypeInternal.SpecialType = SpecialType.System_Object Then 41If constant.Kind = TypedConstantKind.Enum Then 51Debug.Assert(constant.Kind = TypedConstantKind.Enum)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (16)
Attributes\AttributeTests.vb (9)
266Assert.Equal(TypedConstantKind.Enum, a.CommonConstructorArguments(0).Kind) 271Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 276Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 281Assert.Equal(TypedConstantKind.Enum, a.CommonConstructorArguments(0).Kind) 286Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 291Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 296Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 301Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind) 1220Assert.Equal(tc.Kind, TypedConstantKind.Enum)
Attributes\AttributeTests_Tuples.vb (1)
435Assert.Equal(TypedConstantKind.Array, arg.Kind)
Attributes\AttributeTests_WellKnownAttributes.vb (6)
966Assert.Equal(TypedConstantKind.Enum, attrSym.CommonNamedArguments(0).Value.Kind) 977Assert.Equal(TypedConstantKind.Enum, attrSym.CommonNamedArguments(0).Value.Kind) 980Assert.Equal(TypedConstantKind.Primitive, attrSym.CommonNamedArguments(1).Value.Kind) 1203Assert.Equal(TypedConstantKind.Enum, attrSym.CommonNamedArguments(0).Value.Kind) 3440Assert.Equal(TypedConstantKind.Enum, attrSym.CommonConstructorArguments(0).Kind) 3449Assert.Equal(TypedConstantKind.Enum, attrSym.CommonConstructorArguments(0).Kind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (8)
SymbolsTests\TypedConstantTests.vb (8)
39Assert.Equal(common.Kind, lang.Kind) 43Assert.Equal(common.Kind, common2.Kind) 52Assert.Equal(commonArray.Kind, langArray.Kind) 56Assert.Equal(commonArray.Kind, commonArray2.Kind)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
Extensions.vb (4)
156Assert.Equal(kind, arg.Kind) 165Assert.Equal(arg.Kind, kind) 174Assert.Equal(arg.Kind, kind) 180Select Case arg.Kind
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\ExpressionGenerator.vb (1)
19Select Case typedConstant.Kind