713 references to TypedConstantKind
Microsoft.CodeAnalysis (29)
MetadataReader\MetadataDecoder.cs (11)
1589TypedConstantKind kind = PEModule.CrackStringInAttributeValue(out s, ref argReader) ? 1590TypedConstantKind.Primitive : 1591TypedConstantKind.Error; 1601return CreateTypedConstant(type, TypedConstantKind.Type, serializedType); 1608private static TypedConstantKind GetPrimitiveOrEnumTypedConstantKind(TypeSymbol type) 1610return (type.TypeKind == TypeKind.Enum) ? TypedConstantKind.Enum : TypedConstantKind.Primitive; 2229return new TypedConstant(type, TypedConstantKind.Error, null); 2236private static TypedConstant CreateTypedConstant(TypeSymbol type, TypedConstantKind kind, object value) 2240return new TypedConstant(type, TypedConstantKind.Error, null); 2246private static TypedConstant CreateTypedConstant(TypeSymbol type, TypedConstantKind kind, bool value)
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 (16)
19private readonly TypedConstantKind _kind; 23internal TypedConstant(ITypeSymbolInternal? type, TypedConstantKind kind, object? value) 25Debug.Assert(kind == TypedConstantKind.Array || !(value is ImmutableArray<TypedConstant>)); 27Debug.Assert(type is object || kind == TypedConstantKind.Error); 35: this(type, TypedConstantKind.Array, value: array.IsDefault ? null : (object)array) 42public TypedConstantKind Kind 97if (Kind == TypedConstantKind.Array) 113if (Kind != TypedConstantKind.Array) 135if (_kind == TypedConstantKind.Error) 156internal static TypedConstantKind GetTypedConstantKind(ITypeSymbolInternal type, Compilation compilation) 176return TypedConstantKind.Primitive; 181return TypedConstantKind.Array; 183return TypedConstantKind.Enum; 185return TypedConstantKind.Error; 191return TypedConstantKind.Type; 194return TypedConstantKind.Error;
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 (105)
Binder\Binder_Attributes.cs (22)
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) 935var typedConstantKind = node.Type.GetAttributeParameterTypedConstantKind(_binder.Compilation); 937return VisitExpression(node, typedConstantKind, diagnostics, ref attrHasErrors, curArgumentHasErrors || typedConstantKind == TypedConstantKind.Error); 940private TypedConstant VisitExpression(BoundExpression node, TypedConstantKind typedConstantKind, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors) 949typedConstantKind = TypedConstantKind.Error; 966return CreateTypedConstant(node, TypedConstantKind.Error, diagnostics, ref attrHasErrors, curArgumentHasErrors); 992var typedConstantKind = operandType.GetAttributeParameterTypedConstantKind(_binder.Compilation); 997return CreateTypedConstant(node, TypedConstantKind.Error, diagnostics, ref attrHasErrors, curArgumentHasErrors); 1033return CreateTypedConstant(node, TypedConstantKind.Type, diagnostics, ref attrHasErrors, curArgumentHasErrors, simpleValue: node.SourceType.Type); 1043return CreateTypedConstant(node, TypedConstantKind.Error, diagnostics, ref attrHasErrors, curArgumentHasErrors); 1047var typedConstantKind = type.GetAttributeParameterTypedConstantKind(_binder.Compilation); 1065initializer = ImmutableArray.Create(CreateTypedConstant(node, TypedConstantKind.Error, diagnostics, ref attrHasErrors, curArgumentHasErrors)); 1077private static TypedConstant CreateTypedConstant(BoundExpression node, TypedConstantKind typedConstantKind, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors, 1083if (typedConstantKind != TypedConstantKind.Error && type.ContainsTypeParameter()) 1104typedConstantKind = TypedConstantKind.Error; 1107if (typedConstantKind == TypedConstantKind.Error) 1115return new TypedConstant(type, TypedConstantKind.Error, null); 1117else if (typedConstantKind == TypedConstantKind.Array)
Compiler\ClsComplianceChecker.cs (1)
279paramType.Type.GetAttributeParameterTypedConstantKind(_compilation) == TypedConstantKind.Error)
Emitter\Model\AttributeDataAdapter.cs (3)
30Debug.Assert(argument.Kind != TypedConstantKind.Error); 108case TypedConstantKind.Array: 111case TypedConstantKind.Type:
Emitter\Model\PEModuleBuilder.cs (4)
1615var value = flagsBuilder.SelectAsArray((flag, byteType) => new TypedConstant(byteType, TypedConstantKind.Primitive, flag), byteType); 1637ImmutableArray.Create(new TypedConstant(byteType, TypedConstantKind.Primitive, nullableValue))); 1657ImmutableArray.Create(new TypedConstant(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value))); 1699var transformFlags = builder.SelectAsArray((flag, constantType) => new TypedConstant(constantType, TypedConstantKind.Primitive, flag), booleanType);
Emitter\NoPia\EmbeddedType.cs (2)
280ImmutableArray.Create(new TypedConstant(stringType, TypedConstantKind.Primitive, guidString), 281new TypedConstant(stringType, TypedConstantKind.Primitive,
Emitter\NoPia\EmbeddedTypesManager.cs (1)
148ImmutableArray.Create(new TypedConstant(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
155new TypedConstant(manager.System_Diagnostics_DebuggerBrowsableState, TypedConstantKind.Enum, DebuggerBrowsableState.Never))));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
220arguments: ImmutableArray.Create(new TypedConstant(Manager.System_String, TypedConstantKind.Primitive, displayString)), 223new TypedConstant(Manager.System_String, TypedConstantKind.Primitive, "<Anonymous Type>"))));
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\Compilation_WellKnownMembers.cs (13)
467new TypedConstant(systemByte, TypedConstantKind.Primitive, scale), 468new TypedConstant(systemByte, TypedConstantKind.Primitive, (byte)(isNegative ? 128 : 0)), 469new TypedConstant(systemUnit32, TypedConstantKind.Primitive, high), 470new TypedConstant(systemUnit32, TypedConstantKind.Primitive, mid), 471new TypedConstant(systemUnit32, TypedConstantKind.Primitive, low) 477var ticks = new TypedConstant(GetSpecialType(SpecialType.System_Int64), TypedConstantKind.Primitive, value.Ticks); 494TypedConstantKind.Enum, 735var typedConstantDebugMode = new TypedConstant(debuggingModesType, TypedConstantKind.Enum, constantVal); 788new TypedConstant(attributeTargetsType, TypedConstantKind.Enum, targets)); 790new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, new TypedConstant(boolType, TypedConstantKind.Primitive, allowMultiple)), 791new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__Inherited, new TypedConstant(boolType, TypedConstantKind.Primitive, inherited))); 821new TypedConstant(constantType, TypedConstantKind.Primitive, name), stringType); 868var result = flagsBuilder.SelectAsArray((flag, constantType) => new TypedConstant(constantType, TypedConstantKind.Primitive, flag), booleanType);
Symbols\MethodSymbol.cs (4)
1002Debug.Assert(callConvTypedConstant.Kind == TypedConstantKind.Type); 1230new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.RequiredMembersMarker), // message 1231new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)) // error 1236ImmutableArray.Create(new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RequiredMembers)))
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
1265if (oldConstant.Kind == TypedConstantKind.Array) 1281if ((oldConstant.Kind == TypedConstantKind.Type) && (oldConstantValue != null))
Symbols\Source\SourceAssemblySymbol.cs (6)
1819var typedConstantRequestMinimum = new TypedConstant(securityActionType, TypedConstantKind.Enum, constantValue); 1825var typedConstantTrue = new TypedConstant(boolType, TypedConstantKind.Primitive, value: true); 1957var typedConstantNoStringInterning = new TypedConstant(int32Type, TypedConstantKind.Primitive, Cci.Constants.CompilationRelaxations_NoStringInterning); 1976var typedConstantTrue = new TypedConstant(boolType, TypedConstantKind.Primitive, value: true); 2010var typedConstant = new TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyContainer); 2020var typedConstant = new TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyFile);
Symbols\Source\SourceComplexParameterSymbol.cs (2)
962SpecialType specialType = arg.Kind == TypedConstantKind.Enum ? 971if (arg.Kind != TypedConstantKind.Array && arg.ValueInternal == null)
Symbols\Source\SourceFixedFieldSymbol.cs (2)
47var item1 = new TypedConstant(systemType, TypedConstantKind.Type, ((PointerTypeSymbol)this.Type).PointedAtType); 48var item2 = new TypedConstant(intType, TypedConstantKind.Primitive, this.FixedSize);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
934TypedConstantKind.Type, stateMachineType.GetUnboundGenericTypeOrSelf());
Symbols\Source\SourceModuleSymbol.cs (2)
592var version = ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, 11)); 599new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, _assemblySymbol.InternalsAreVisible));
Symbols\Source\SourceNamedTypeSymbol.cs (6)
1258Debug.Assert(argument.Kind == TypedConstantKind.Type); 1580new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.ByRefLikeMarker), // message 1581new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true 1586ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))), 1599var defaultMemberNameConstant = new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, defaultMemberName); 1635ImmutableArray.Create(new TypedConstant(compilation.GetWellKnownType(WellKnownType.System_Type), TypedConstantKind.Type, originalType)),
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);
Symbols\TypeSymbolExtensions.cs (16)
219return GetAttributeParameterTypedConstantKind(type, compilation) != TypedConstantKind.Error; 228public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation) 240TypedConstantKind kind = TypedConstantKind.Error; 243return TypedConstantKind.Error; 251return TypedConstantKind.Error; 254kind = TypedConstantKind.Array; 264if (kind == TypedConstantKind.Error) 267kind = TypedConstantKind.Enum; 273var typedConstantKind = TypedConstant.GetTypedConstantKind(type, compilation); 276case TypedConstantKind.Array: 277case TypedConstantKind.Enum: 278case TypedConstantKind.Error: 279return TypedConstantKind.Error; 282if (kind == TypedConstantKind.Array || kind == TypedConstantKind.Enum)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
ExpressionGenerator.cs (4)
29case TypedConstantKind.Primitive: 30case TypedConstantKind.Enum: 33case TypedConstantKind.Type: 38case TypedConstantKind.Array:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (226)
Attributes\AttributeTests.cs (175)
491attrs[0].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.UnitTests"); 493attrs[1].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp"); 495attrs[2].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.UnitTests"); 497attrs[3].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.Test.Utilities"); 499attrs[4].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.VisualBasic"); 685Assert.Equal(TypedConstantKind.Error, attrs[0].ConstructorArguments.Single().Kind); 1397a.VerifyValue(0, TypedConstantKind.Enum, (int)System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5); 1401a.VerifyValue(0, TypedConstantKind.Primitive, ""); 1405a.VerifyValue(0, TypedConstantKind.Primitive, true); 1409a.VerifyValue(0, TypedConstantKind.Enum, (int)AssemblyNameFlags.Retargetable); 1413a.VerifyValue(0, TypedConstantKind.Primitive, "MyKey.snk"); 1417a.VerifyValue(0, TypedConstantKind.Primitive, "Key Name"); 1421a.VerifyValue(0, TypedConstantKind.Primitive, "1.2.*"); 1425a.VerifyValue(0, TypedConstantKind.Primitive, "4.3.2.100"); 1482attrs.First().VerifyValue<object>(0, TypedConstantKind.Primitive, null); 1568attrs.First().VerifyValue(0, TypedConstantKind.Primitive, true); 1672attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeof(object)); 1673attrs.First().VerifyNamedArgumentValue<object>(0, "O", TypedConstantKind.Primitive, null); 1678attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { typeof(string) }); 1683attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", typeof(string), 3.1415926 }); 1686attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { typeof(string) } }); 3068attrs[1].VerifyNamedArgumentValue<ushort>(0, "UShortField", TypedConstantKind.Primitive, 1234); 3077attrs[0].VerifyValue(0, TypedConstantKind.Enum, (int)FileMode.Open); 3078attrs[0].VerifyValue(1, TypedConstantKind.Enum, (int)(BindingFlags.DeclaredOnly | BindingFlags.Public)); 3079attrs[0].VerifyNamedArgumentValue<uint>(0, "UIntField", TypedConstantKind.Primitive, 1230); 3084attrs[0].VerifyValue(0, TypedConstantKind.Array, new char[] { 'q', 'c' }); 3093attrs[0].VerifyValue<object>(0, TypedConstantKind.Primitive, null); 3094attrs[0].VerifyValue<long>(1, TypedConstantKind.Primitive, 256); 3095attrs[0].VerifyValue<float>(2, TypedConstantKind.Primitive, 0); 3096attrs[0].VerifyValue<short>(3, TypedConstantKind.Primitive, -1); 3097attrs[0].VerifyNamedArgumentValue<ulong[]>(0, "AryField", TypedConstantKind.Array, new ulong[] { 0, 1, 12345657 }); 3099attrs[1].VerifyValue<object>(0, TypedConstantKind.Type, typeof(Dictionary<string, int>)); 3100attrs[1].VerifyValue<long>(1, TypedConstantKind.Primitive, 265); 3101attrs[1].VerifyValue<float>(2, TypedConstantKind.Primitive, -0.0001f); 3102attrs[1].VerifyValue<short>(3, TypedConstantKind.Primitive, 2); 3139attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 0, "", null }); 3140attrs.First().VerifyValue<byte>(1, TypedConstantKind.Primitive, 255); 3141attrs.First().VerifyValue<sbyte>(2, TypedConstantKind.Primitive, -128); 3142attrs.First().VerifyNamedArgumentValue<object[]>(0, "AryProp", TypedConstantKind.Array, new object[] { new object[] { "", typeof(IList<string>) } }); 3148attrs[0].VerifyValue<object>(0, TypedConstantKind.Type, typeof(string[,,])); 3181attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 1, null, "Hi" }); 3182attrs.First().VerifyNamedArgumentValue<object>(0, "ObjectField", TypedConstantKind.Primitive, 2); 3413attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3414attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3424attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3425attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3493attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "MultipleArgumentsToParamsParameter"); 3494attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { 4, 5, 6 }); 3500attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NoArgumentsToParamsParameter"); 3501attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { }); 3507attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NullArgumentToParamsParameter"); 3508attr.VerifyValue<int[]>(1, TypedConstantKind.Array, null); 3550attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3551attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3561attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3562attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3597attrs.First().VerifyValue(0, TypedConstantKind.Type, typeof(Object)); 3642attrs.First().VerifyValue(0, TypedConstantKind.Array, (object[])null); 4044attr.VerifyValue(0, TypedConstantKind.Enum, (int)(AttributeTargets.Field | AttributeTargets.Event)); 4047attr.VerifyNamedArgumentValue(0, "Inherited", TypedConstantKind.Primitive, false); 4048attr.VerifyNamedArgumentValue(1, "AllowMultiple", TypedConstantKind.Primitive, true); 4098attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 4); 4099attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 5); 4101attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6); 4141attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4142attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4143attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4145attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6); 4187attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4188attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 1); 4230attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4231attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4232attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4234attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6); 4276attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 2); 4479attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4485attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4534attrs.First().VerifyValue(0, TypedConstantKind.Type, cClass.AsUnboundGenericType()); 4574attrs.First().VerifyValue(0, TypedConstantKind.Type, bClass.AsUnboundGenericType()); 4670enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Enum, (int)new DayOfWeek()); 4672enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new bool()); 4674enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new sbyte()); 4676enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new byte()); 4678enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new short()); 4680enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new ushort()); 4682enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new int()); 4684enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new uint()); 4686enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new char()); 4688enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new float()); 4690enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new Single()); 4692enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new double()); 4957attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 4963attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 1); 5018attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5022attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5030attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5034attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5197attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5202attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5208attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5215attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5224attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5231attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5320attributes[0].VerifyValue(0, TypedConstantKind.Primitive, value); 9115attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9116attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9117attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9120attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9121attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9122attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9126attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9127attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9128attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9196attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9197attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9198attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9202attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9203attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9204attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9209attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9210attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9211attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9214attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { "A" }); 9215attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9216attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9280attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9281attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9282attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9285attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9286attrs2[1].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9287attrs2[2].VerifyValue(0, TypedConstantKind.Array, (string[])null); 9291attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9292attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9296attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9297attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9298attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9353attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9354attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9357attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9358attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9359attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9363attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9364attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9365attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9427attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9428attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9432attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9433attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9434attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9439attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9440attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9441attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9444attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { 1 }); 9445attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, 1); 9446attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, 1); 9507attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9508attrs1[1].VerifyValue(0, TypedConstantKind.Array, new object[] { value1 }); 9509attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9513attrs2[0].VerifyValue(0, TypedConstantKind.Array, value2); 9514attrs2[1].VerifyValue(0, TypedConstantKind.Array, value2); 9518attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9519attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9523attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9524attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9525attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9577attrs[0].VerifyValue(0, TypedConstantKind.Array, nullArray); 9579attrs[1].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9581attrs[2].VerifyValue(0, TypedConstantKind.Array, nullArray); 9582attrs[2].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray); 9584attrs[3].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9585attrs[3].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray); 9587attrs[4].VerifyValue(0, TypedConstantKind.Array, nullArray); 9588attrs[4].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray); 9590attrs[5].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9591attrs[5].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray);
Attributes\AttributeTests_Dynamic.cs (2)
541Assert.Equal(TypedConstantKind.Array, argument.Kind); 550Assert.Equal(TypedConstantKind.Primitive, actualTransformFlag.Kind);
Attributes\AttributeTests_Security.cs (1)
63typeAttribute.VerifyNamedArgumentValue(0, "MayLeakOnAbort", TypedConstantKind.Primitive, true);
Attributes\AttributeTests_Synthesized.cs (4)
70attribute.VerifyValue(0, TypedConstantKind.Primitive, expectedArgValue); 82attribute.VerifyNamedArgumentValue<bool>(0, "WrapNonExceptionThrows", TypedConstantKind.Primitive, true); 108attribute.VerifyValue(0, TypedConstantKind.Enum, (int)expectedDebuggingMode); 1970new TypedConstant(comp.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, "unused"))));
Attributes\AttributeTests_Tuples.cs (1)
638Assert.Equal(TypedConstantKind.Array, arg.Kind);
Attributes\AttributeTests_WellKnownAttributes.cs (43)
140attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 164attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123"); 167attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)ComInterfaceType.InterfaceIsIUnknown); 170attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 173attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibTypeFlags.FAggregatable); 176attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 177attrSym.VerifyNamedArgumentValue(0, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true); 266attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 269attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)CallingConvention.StdCall); 272attrSym.VerifyNamedArgumentValue(0, "BestFitMapping", TypedConstantKind.Primitive, true); 273attrSym.VerifyNamedArgumentValue(1, "CharSet", TypedConstantKind.Enum, (int)CharSet.Ansi); 274attrSym.VerifyNamedArgumentValue(2, "SetLastError", TypedConstantKind.Primitive, true); 275attrSym.VerifyNamedArgumentValue(3, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true); 282attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 285attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ProgId"); 289attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123); 292attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 306attrSym.VerifyValue(0, TypedConstantKind.Primitive, true); 309attrSym.VerifyValue(1, TypedConstantKind.Primitive, "EGoo, InteropAttribute, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); 317attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibVarFlags.FDisplayBind); 321attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message"); 322attrSym.VerifyValue(1, TypedConstantKind.Primitive, false); 416attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99uL); 424attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref"); 435attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0f); 455attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100); 469attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)LayoutKind.Explicit); 471attrSym.VerifyNamedArgumentValue(0, "Size", TypedConstantKind.Primitive, 16); 472attrSym.VerifyNamedArgumentValue(1, "Pack", TypedConstantKind.Primitive, 8); 473attrSym.VerifyNamedArgumentValue(2, "CharSet", TypedConstantKind.Enum, (int)CharSet.Unicode); 480attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)UnmanagedType.I8); 482attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0); 2399attrSym.VerifyValue(0, TypedConstantKind.Primitive, "unmanaged.dll"); 2401attrSym.VerifyNamedArgumentValue(0, "CallingConvention", TypedConstantKind.Enum, (int)CallingConvention.FastCall); 2402attrSym.VerifyNamedArgumentValue(1, "SetLastError", TypedConstantKind.Primitive, true); 2407attrSym.VerifyValue(0, TypedConstantKind.Primitive, "user32.dll"); 2409attrSym.VerifyNamedArgumentValue(0, "CharSet", TypedConstantKind.Enum, (int)CharSet.Unicode); 2410attrSym.VerifyNamedArgumentValue(1, "ExactSpelling", TypedConstantKind.Primitive, false); 2411attrSym.VerifyNamedArgumentValue(2, "EntryPoint", TypedConstantKind.Primitive, "MessageBox"); 5067attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)AttributeTargets.Class); 5069attrSym.VerifyNamedArgumentValue(0, "AllowMultiple", TypedConstantKind.Primitive, true); 5073attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)AttributeTargets.Class); 5075attrSym.VerifyNamedArgumentValue(0, "AllowMultiple", TypedConstantKind.Primitive, false);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (111)
Symbols\Metadata\PE\LoadingAttributes.cs (94)
61aBoolInst.VerifyValue(0, TypedConstantKind.Primitive, true); 64aByteInst.VerifyValue(0, TypedConstantKind.Primitive, Convert.ToByte(1)); 67aCharInst.VerifyValue(0, TypedConstantKind.Primitive, 'a'); 70aSingleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.14159f); 73aDoubleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 76aInt16Inst.VerifyValue(0, TypedConstantKind.Primitive, (Int16)16); 79aInt32Inst.VerifyValue(0, TypedConstantKind.Primitive, 32); 82aInt64Inst.VerifyValue(0, TypedConstantKind.Primitive, 64L); 85aObjectInst.VerifyValue(0, TypedConstantKind.Primitive, "object"); 88aStringInst.VerifyValue(0, TypedConstantKind.Primitive, "assembly"); 91aTypeInst.VerifyValue(0, TypedConstantKind.Type, typeof(string)); 133aBoolInst.VerifyValue(0, TypedConstantKind.Primitive, true); 136aByteInst.VerifyValue(0, TypedConstantKind.Primitive, Convert.ToByte(1)); 139aCharInst.VerifyValue(0, TypedConstantKind.Primitive, 'a'); 142aSingleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.14159f); 145aDoubleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 148aInt16Inst.VerifyValue(0, TypedConstantKind.Primitive, (Int16)16); 151aInt32Inst.VerifyValue(0, TypedConstantKind.Primitive, 32); 154aInt64Inst.VerifyValue(0, TypedConstantKind.Primitive, 64L); 157aObjectInst.VerifyValue(0, TypedConstantKind.Primitive, "object"); 160aStringInst.VerifyValue(0, TypedConstantKind.Primitive, "module"); 163aTypeInst.VerifyValue(0, TypedConstantKind.Type, typeof(string)); 205c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1"); 208innerC1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "InnerC1"); 215innerC2.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "InnerC2"); 218field1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "field1"); 221property1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Property1"); 224sub1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Sub1"); 227sub1P1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "p1"); 230function1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Function1"); 269a.VerifyNamedArgumentValue(0, "B", TypedConstantKind.Primitive, true); 272a.VerifyNamedArgumentValue(0, "B", TypedConstantKind.Primitive, Convert.ToByte(1)); 275a.VerifyNamedArgumentValue(0, "C", TypedConstantKind.Primitive, 'b'); 278a.VerifyNamedArgumentValue(0, "E", TypedConstantKind.Enum, 0); 281a.VerifyNamedArgumentValue(0, "S", TypedConstantKind.Primitive, 3.14159f); 284a.VerifyNamedArgumentValue(0, "D", TypedConstantKind.Primitive, 3.1415926); 287a.VerifyNamedArgumentValue(0, "I", TypedConstantKind.Primitive, (Int16)16); 290a.VerifyNamedArgumentValue(0, "I", TypedConstantKind.Primitive, 32); 293a.VerifyNamedArgumentValue(0, "I", TypedConstantKind.Primitive, 64L); 296a.VerifyNamedArgumentValue(0, "T", TypedConstantKind.Type, c3); 328a.VerifyNamedArgumentValue(0, "IA", TypedConstantKind.Array, new int[] { 1, 2 }); 332a.VerifyNamedArgumentValue(0, "EA", TypedConstantKind.Array, new int[] { 0, 1 }); 336a.VerifyNamedArgumentValue(0, "SA", TypedConstantKind.Array, new string[] { "Yes", "No" }); 340a.VerifyNamedArgumentValue(0, "OA", TypedConstantKind.Array, new string[] { "Yes", "No" }); 346a.VerifyNamedArgumentValue(0, "TA", TypedConstantKind.Array, new TypeSymbol[] { c1, c3 }); 385c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1"); 432l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<>"); 435l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<C1>"); 438l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.String>"); 441l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<C1, System.String>>"); 444l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, C1.InnerC1<System.Int32>.InnerC2<System.String, System.String>>>"); 477arg.VerifyValue(0, TypedConstantKind.Array, new int[] { 1, 2 }); 481arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 485arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 489arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 493arg.VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { stringType } }); 499arg.VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", stringType, 3.1415926 }); 505arg.VerifyValue(0, TypedConstantKind.Array, new object[] { 1, new object[] { 2, 3, 4 }, 5 }); 511arg.VerifyValue(0, TypedConstantKind.Array, new int[] { 1, 2, 3 }); 606a.VerifyValue(0, TypedConstantKind.Primitive, "InteropAttributes"); 609a.VerifyValue(1, TypedConstantKind.Primitive, 2); 612a.VerifyValue(0, TypedConstantKind.Primitive, "1234C65D-1234-447A-B786-64682CBEF136"); 615a.VerifyValue(0, TypedConstantKind.Primitive, false); 616a.VerifyNamedArgumentValue(0, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true); 619a.VerifyValue(0, TypedConstantKind.Primitive, false); 630a.VerifyValue(2, TypedConstantKind.Primitive, 3); 637a.VerifyValue(0, TypedConstantKind.Primitive, true); 644a.VerifyValue(0, TypedConstantKind.Primitive, 8); 647a.VerifyNamedArgumentValue(0, "WrapNonExceptionThrows", TypedConstantKind.Primitive, true); 694attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123"); 747attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 757attrSym.VerifyNamedArgumentValue(0, "BestFitMapping", TypedConstantKind.Primitive, true); 758attrSym.VerifyNamedArgumentValue(1, "CharSet", TypedConstantKind.Enum, (int)CharSet.Ansi); 759attrSym.VerifyNamedArgumentValue(2, "SetLastError", TypedConstantKind.Primitive, true); 760attrSym.VerifyNamedArgumentValue(3, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true); 797attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message"); 798attrSym.VerifyValue(1, TypedConstantKind.Primitive, false); 854attrSym.VerifyValue(0, TypedConstantKind.Type, cbar); 858attrSym.VerifyValue(0, TypedConstantKind.Primitive, "MyIndex"); 863mem.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, 10); 897attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 927attrSym.VerifyNamedArgumentValue(0, "UShortField", TypedConstantKind.Primitive, Convert.ToUInt16(321)); 931attrSym.VerifyNamedArgumentValue(0, "TypeField", TypedConstantKind.Type, typeof(Dictionary<string, int>)); 968attrSym.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 977attrSym.VerifyValue(0, TypedConstantKind.Primitive, 'q'); 978attrSym.VerifyValue(1, TypedConstantKind.Primitive, Convert.ToByte(2)); 990attrSym.VerifyValue(0, TypedConstantKind.Primitive, "555"); 1005attrSym.VerifyValue(0, TypedConstantKind.Array, new sbyte[] { -1, 0, 1 }); 1183attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.0.30319.18408"); 1187attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.0.30319.18408"); 1243attr.VerifyValue(0, TypedConstantKind.Primitive, "genericUriParserOptions"); 1244attr.VerifyNamedArgumentValue(1, "IsRequired", TypedConstantKind.Primitive, true); 1276attr.VerifyValue(0, TypedConstantKind.Primitive, "DataCategory_Mapping"); 1279attr.VerifyValue(0, TypedConstantKind.Primitive, "DataAdapter_MissingMappingAction");
Symbols\Retargeting\RetargetCustomAttributes.cs (3)
151attribute.VerifyValue(0, TypedConstantKind.Type, newMsCorLib_systemType); 154attribute.VerifyNamedArgumentValue<object>(0, "Target", TypedConstantKind.Type, typeof(int[])); 155attribute.VerifyNamedArgumentValue(1, "TargetTypeName", TypedConstantKind.Primitive, "IntArrayType");
Symbols\TypedConstantTests.cs (14)
44TypedConstant common = new TypedConstant(_systemType, TypedConstantKind.Type, _namedType); 57new[] { new TypedConstant(_systemType, TypedConstantKind.Type, _namedType) }.AsImmutableOrNull()); 77new TypedConstant(_intType, TypedConstantKind.Primitive, 1), 78new TypedConstant(_intType, TypedConstantKind.Primitive, 1)); 84new TypedConstant(_stringType, TypedConstantKind.Primitive, s1), 85new TypedConstant(_stringType, TypedConstantKind.Primitive, s2)); 88new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 89new TypedConstant(_stringType, TypedConstantKind.Primitive, null)); 92new TypedConstant(_enumString1, TypedConstantKind.Primitive, null), 93new TypedConstant(_enumString2, TypedConstantKind.Primitive, null)); 96new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 97new TypedConstant(_stringType, TypedConstantKind.Error, null)); 100new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 101new TypedConstant(_systemType, TypedConstantKind.Primitive, null));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
Extensions.cs (5)
366public static void VerifyValue<T>(this CSharpAttributeData attr, int i, TypedConstantKind kind, T v) 373public static void VerifyNamedArgumentValue<T>(this CSharpAttributeData attr, int i, string name, TypedConstantKind kind, T v) 386case TypedConstantKind.Array: 388case TypedConstantKind.Enum: 390case TypedConstantKind.Type:
TestAttributesVisitor.cs (1)
189if (value.Kind == TypedConstantKind.Array)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdDumpTest.cs (4)
292case TypedConstantKind.Array: 309case TypedConstantKind.Type: 315case TypedConstantKind.Enum: 316case TypedConstantKind.Primitive:
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
ExpressionGenerator.cs (4)
29case TypedConstantKind.Primitive: 30case TypedConstantKind.Enum: 33case TypedConstantKind.Type: 38case TypedConstantKind.Array:
Microsoft.CodeAnalysis.Features (5)
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 (1)
6032TypedConstantKind.Array => x.Values.SequenceEqual(y.Values, TypedConstantComparer.Instance),
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
360if (argument.Kind != TypedConstantKind.Primitive || argument.Value is not string argString)
Microsoft.CodeAnalysis.UnitTests (12)
CommonTypedConstantTests.cs (12)
42new TypedConstant(_intType, TypedConstantKind.Primitive, 1), 43new TypedConstant(_intType, TypedConstantKind.Primitive, 1)); 49new TypedConstant(_stringType, TypedConstantKind.Primitive, s1), 50new TypedConstant(_stringType, TypedConstantKind.Primitive, s2)); 53new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 54new TypedConstant(_stringType, TypedConstantKind.Primitive, null)); 57new TypedConstant(_enumString1, TypedConstantKind.Primitive, null), 58new TypedConstant(_enumString2, TypedConstantKind.Primitive, null)); 61new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 62new TypedConstant(_stringType, TypedConstantKind.Error, null)); 65new TypedConstant(_stringType, TypedConstantKind.Primitive, null), 66new TypedConstant(_enumString1, TypedConstantKind.Primitive, null));
Microsoft.CodeAnalysis.VisualBasic (62)
Binding\Binder_Attributes.vb (2)
883If kind = TypedConstantKind.Array Then 893Return New TypedConstant(type, TypedConstantKind.Error, Nothing)
Emit\AttributeDataAdapter.vb (2)
71Case TypedConstantKind.Array 73Case TypedConstantKind.Type
Emit\NoPia\EmbeddedType.vb (2)
220ImmutableArray.Create(New TypedConstant(stringType, TypedConstantKind.Primitive, guidString), 221New TypedConstant(stringType, TypedConstantKind.Primitive, UnderlyingNamedType.AdaptedNamedTypeSymbol.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))),
Emit\NoPia\EmbeddedTypesManager.vb (1)
109ImmutableArray.Create(New TypedConstant(ctor.Parameters(0).Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (1)
180Dim value As New TypedConstant(Manager.System_String, TypedConstantKind.Primitive, "<generated method>")
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (1)
184ImmutableArray.Create(New TypedConstant(Manager.System_String, TypedConstantKind.Primitive, builder.ToStringAndFree())))
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 (2)
736If oldConstant.Kind = TypedConstantKind.Array Then 748If (oldConstant.Kind = TypedConstantKind.Type) AndAlso (oldConstantValue IsNot Nothing) Then
Symbols\Source\SourceAssemblySymbol.vb (5)
1503Dim typedConstantNoStringInterning = New TypedConstant(int32Type, TypedConstantKind.Primitive, Cci.Constants.CompilationRelaxations_NoStringInterning) 1521Dim typedConstantTrue = New TypedConstant(boolType, TypedConstantKind.Primitive, True) 1559Dim typedConstantDebugMode = New TypedConstant(int32Type, TypedConstantKind.Enum, CInt(debuggingMode)) 1576Dim typedConstant = New TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyContainer) 1585Dim typedConstant = New TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyFile)
Symbols\Source\SourceFieldSymbol.vb (1)
675New TypedConstant(specialTypeInt64, TypedConstantKind.Primitive, attributeValue.Ticks))))
Symbols\Source\SourceMemberMethodSymbol.vb (1)
1013If arg.Kind <> TypedConstantKind.Array AndAlso CInt(arg.ValueInternal) = DESIGNERSERIALIZATIONVISIBILITYTYPE_CONTENT Then
Symbols\Source\SourceNamedTypeSymbol.vb (7)
2193If attrData.CommonConstructorArguments.Length = 1 AndAlso attrData.CommonConstructorArguments(0).Kind = TypedConstantKind.Primitive Then 2210Debug.Assert(argument.Kind = TypedConstantKind.Type) 2481New TypedConstant(stringType, TypedConstantKind.Primitive, DefaultPropertyName)))) 2496New TypedConstant(GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, _comClassData.ClassId)))) 2502New TypedConstant(GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Enum, CInt(ClassInterfaceType.None))))) 2523New TypedConstant(GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, eventInterfaceName)))) 2549ImmutableArray.Create(New TypedConstant(compilation.GetWellKnownType(WellKnownType.System_Type), TypedConstantKind.Type, originalType)),
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (11)
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) 994New TypedConstant(_comClass.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, id)))) 1002TypedConstantKind.Primitive, 1009TypedConstantKind.Primitive, 1016TypedConstantKind.Primitive, 1349TypedConstantKind.Primitive, 1845TypedConstantKind.Primitive,
Symbols\Source\SourceParameterSymbol.vb (2)
421Dim specialType = If(arg.Kind = TypedConstantKind.Enum, 427If arg.Kind <> TypedConstantKind.Array AndAlso
Symbols\Source\SourceParameterSymbolBase.vb (1)
64TypedConstantKind.Primitive,
Symbols\Source\SourceWithEventsBackingFieldSymbol.vb (1)
76TypedConstantKind.Primitive,
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)
Symbols\WellKnownMembers.vb (9)
221TypedConstantKind.Type, 245New TypedConstant(specialTypeByte, TypedConstantKind.Primitive, scale), 246New TypedConstant(specialTypeByte, TypedConstantKind.Primitive, CByte(If(isNegative, 128, 0))), 247New TypedConstant(specialTypeUInt32, TypedConstantKind.Primitive, high), 248New TypedConstant(specialTypeUInt32, TypedConstantKind.Primitive, mid), 249New TypedConstant(specialTypeUInt32, TypedConstantKind.Primitive, low) 261TypedConstantKind.Enum, 277TypedConstantKind.Enum, 737Return New TypedConstant(constantType, TypedConstantKind.Primitive, name)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (113)
Attributes\AttributeTests.vb (78)
214attrs(0).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.UnitTests") 215attrs(1).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp") 216attrs(2).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.UnitTests") 217attrs(3).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.Test.Utilities") 218attrs(4).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.VisualBasic") 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) 357attrs(0).VerifyValue(0, TypedConstantKind.Primitive, 4) 651attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Type, GetType(Object)) 652attrs(0).VerifyValue(Of Object)(0, "O", TypedConstantKind.Primitive, Nothing) 656attrs(0).VerifyValue(0, TypedConstantKind.Array, {GetType(String)}) 660attrs(0).VerifyValue(Of Object())(0, TypedConstantKind.Array, {1, "two", GetType(String), 3.1415926}) 662attrs(0).VerifyValue(0, TypedConstantKind.Array, {New Object() {GetType(String)}}) 770attrs(0).VerifyValue(0, "TypeField", TypedConstantKind.Type, GetType(FileStream)) 777attrs(1).VerifyValue(Of UShort)(0, "UShortField", TypedConstantKind.Primitive, 1234) 781attrs(4).VerifyValue(Of UShort)(0, "UShortField", TypedConstantKind.Primitive, 1234) 791attrs(0).VerifyValue(0, TypedConstantKind.Enum, CInt(FileMode.Open)) 792attrs(0).VerifyValue(1, TypedConstantKind.Enum, CInt(BindingFlags.DeclaredOnly Or BindingFlags.Public)) 793attrs(0).VerifyValue(0, "UIntField", TypedConstantKind.Primitive, 1230) 798attrs(0).VerifyValue(0, TypedConstantKind.Array, {"q"c, "c"c}) 802attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, Nothing) 803attrs(0).VerifyValue(Of Long)(1, TypedConstantKind.Primitive, 256) 804attrs(0).VerifyValue(Of Single)(2, TypedConstantKind.Primitive, 0) 805attrs(0).VerifyValue(Of Short)(3, TypedConstantKind.Primitive, -1) 806attrs(0).VerifyValue(Of ULong())(0, "AryField", TypedConstantKind.Array, New ULong() {0, 1, 12345657}) 808attrs(1).VerifyValue(Of Object)(0, TypedConstantKind.Type, GetType(Dictionary(Of String, Integer))) 809attrs(1).VerifyValue(Of Long)(1, TypedConstantKind.Primitive, 265) 810attrs(1).VerifyValue(Of Single)(2, TypedConstantKind.Primitive, -0.0001F) 811attrs(1).VerifyValue(Of Short)(3, TypedConstantKind.Primitive, 2) 852attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Array, New Object() {0, "", Nothing}) 853attrs(0).VerifyValue(Of Byte)(1, TypedConstantKind.Primitive, 255) 854attrs(0).VerifyValue(Of SByte)(2, TypedConstantKind.Primitive, -128) 855attrs(0).VerifyValue(Of Object())(0, "AryProp", TypedConstantKind.Array, New Object() {New Object() {"", GetType(IList(Of String))}}) 865attrs(1).VerifyValue(Of Object)(0, TypedConstantKind.Type, GetType(String(,,))) 905attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Array, New Object() {1, Nothing, "Hi"}) 906attrs(0).VerifyValue(Of Object)(0, "ObjectField", TypedConstantKind.Primitive, 2) 940attrs(0).VerifyValue(Of Char())(0, TypedConstantKind.Array, New Char() {" "c, Nothing}) 941attrs(0).VerifyValue(Of String())(1, TypedConstantKind.Array, New String() {""}) 951attrs(0).VerifyValue(Of Char())(0, TypedConstantKind.Array, New Char() {" "c, Nothing}) 952attrs(0).VerifyValue(Of String())(1, TypedConstantKind.Array, New String() {""}) 1012attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "f1 return type") 1016attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "p1 return type") 1021attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "p2 return type") 1025attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "f2 returns an integer") 1169attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, 1) 1170attrs(1).VerifyValue(Of Object)(0, TypedConstantKind.Array, New String() {"a", "b"}) 1171attrs(2).VerifyValue(Of Object)(0, "X", TypedConstantKind.Primitive, 1) 1172attrs(3).VerifyValue(Of Object)(0, "X", TypedConstantKind.Array, New String() {"a", "b"}) 1220Assert.Equal(tc.Kind, TypedConstantKind.Enum) 1261attrs(0).VerifyValue(0, TypedConstantKind.Type, bClass.ConstructUnboundGenericType()) 2177attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 2182attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 2188attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 2195attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 2204attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 2211attrs.First().VerifyValue(Of Object)(0, TypedConstantKind.Type, typeArg) 4326methods(0).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Integer() {1, 2, 3}) 4327methods(1).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {1, 2, 3}) 4328methods(2).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New String() {"A", "B", "C"}) 4329methods(3).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {"A", "B", "C"}) 4330methods(4).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {}) ' Value was invalid. 4331methods(5).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {DirectCast({1, 2, 3}, Object), DirectCast({"A", "B", "C"}, Object)}) 4397attrs(0).VerifyValue(0, TypedConstantKind.Array, nullArray) 4399attrs(1).VerifyValue(0, TypedConstantKind.Array, emptyArray) 4401attrs(2).VerifyValue(0, TypedConstantKind.Array, nullArray) 4402attrs(2).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray) 4404attrs(3).VerifyValue(0, TypedConstantKind.Array, emptyArray) 4405attrs(3).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray) 4407attrs(4).VerifyValue(0, TypedConstantKind.Array, nullArray) 4408attrs(4).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray) 4410attrs(5).VerifyValue(0, TypedConstantKind.Array, emptyArray) 4411attrs(5).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray)
Attributes\AttributeTests_Synthesized.vb (4)
727attribute.VerifyValue(Of Integer)(0, TypedConstantKind.Primitive, expectedArgValue) 738attribute.VerifyNamedArgumentValue(Of Boolean)(0, "WrapNonExceptionThrows", TypedConstantKind.Primitive, True) 1041attribute.VerifyValue(0, TypedConstantKind.Enum, CInt(expectedDebuggingMode)) 1829New TypedConstant(comp.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, "unused"))))
Attributes\AttributeTests_Tuples.vb (1)
435Assert.Equal(TypedConstantKind.Array, arg.Kind)
Attributes\AttributeTests_WellKnownAttributes.vb (18)
365attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99UL) 373attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref") 383attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0.0F) 397attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123456) 403attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100) 417attrSym.VerifyValue(0, TypedConstantKind.Enum, CInt(LayoutKind.Explicit)) 419attrSym.VerifyValue(0, "Size", TypedConstantKind.Primitive, 16) 420attrSym.VerifyValue(1, "Pack", TypedConstantKind.Primitive, 8) 421attrSym.VerifyValue(2, "CharSet", TypedConstantKind.Enum, CInt(CharSet.Unicode)) 428attrSym.VerifyValue(0, TypedConstantKind.Enum, CInt(UnmanagedType.I8)) 430attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0) 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) 3625typeAttribute.VerifyNamedArgumentValue(0, "MayLeakOnAbort", TypedConstantKind.Primitive, True)
Emit\CompilationEmitTests.vb (12)
3290typeAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.RequestOptional)) 3292typeAttribute.VerifyNamedArgumentValue(0, "RemotingConfiguration", TypedConstantKind.Primitive, True) 3300typeAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.RequestMinimum)) 3302typeAttribute.VerifyNamedArgumentValue(0, "UnmanagedCode", TypedConstantKind.Primitive, True) 3320typeAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.Demand)) 3322typeAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User1") 3330typeAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.Assert)) 3332typeAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User2") 3345methodAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.Demand)) 3347methodAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User3") 3355methodAttribute.VerifyValue(0, TypedConstantKind.Enum, CInt(DeclarativeSecurityAction.Assert)) 3357methodAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User4")
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (19)
SymbolsTests\Metadata\PE\LoadingAttributes.vb (14)
393a.VerifyValue(0, "IA", TypedConstantKind.Array, {1, 2}) 397a.VerifyValue(0, "EA", TypedConstantKind.Array, {0, 1}) 401a.VerifyValue(0, "SA", TypedConstantKind.Array, {"Yes", "No"}) 405a.VerifyValue(0, "OA", TypedConstantKind.Array, {"Yes", "No"}) 411a.VerifyValue(0, "TA", TypedConstantKind.Array, {c1, c3}) 540arg.VerifyValue(0, TypedConstantKind.Array, {1, 2}) 544arg.VerifyValue(0, TypedConstantKind.Array, {stringType}) 548arg.VerifyValue(0, TypedConstantKind.Array, New Object() {stringType}) 552arg.VerifyValue(0, TypedConstantKind.Array, {stringType}) 556arg.VerifyValue(0, TypedConstantKind.Array, New Object() {New Object() {stringType}}) 562arg.VerifyValue(0, TypedConstantKind.Array, New Object() {1, "two", stringType, 3.1415926}) 568VerifyValue(arg, 0, TypedConstantKind.Array, New Object() {1, New Object() {2, 3, 4}, 5}) 574VerifyValue(arg, 0, TypedConstantKind.Array, New Integer() {1, 2, 3}) 1101attrSym.VerifyValue(0, TypedConstantKind.Array, New SByte() {-1, 0, 1})
SymbolsTests\Retargeting\RetargetingCustomAttributes.vb (3)
143attribute.VerifyValue(0, TypedConstantKind.Type, NewMsCorLib_systemType) 146attribute.VerifyValue(0, "Target", TypedConstantKind.Type, GetType(Integer())) 147attribute.VerifyValue(1, "TargetTypeName", TypedConstantKind.Primitive, "IntArrayType")
SymbolsTests\TypedConstantTests.vb (2)
34Dim common As TypedConstant = New TypedConstant(_systemType, TypedConstantKind.Type, _namedType) 47{New TypedConstant(_systemType, TypedConstantKind.Type, _namedType)}.AsImmutableOrNull())
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (6)
Extensions.vb (6)
154Friend Sub VerifyValue(Of T)(ByVal attr As VisualBasicAttributeData, ByVal i As Integer, ByVal kind As TypedConstantKind, ByVal v As T) 161Friend Sub VerifyValue(Of T)(ByVal attr As VisualBasicAttributeData, ByVal i As Integer, ByVal name As String, ByVal kind As TypedConstantKind, ByVal v As T) 170Friend Sub VerifyNamedArgumentValue(Of T)(ByVal attr As VisualBasicAttributeData, i As Integer, name As String, kind As TypedConstantKind, v As T) 181Case TypedConstantKind.Array 183Case TypedConstantKind.Enum 185Case TypedConstantKind.Type
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CodeGeneration\ExpressionGenerator.vb (4)
20Case TypedConstantKind.Primitive, TypedConstantKind.Enum 23Case TypedConstantKind.Array 30Case TypedConstantKind.Type