344 references to Primitive
ILLink.RoslynAnalyzer (1)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp (36)
Emitter\Model\PEModuleBuilder.cs (4)
1580var value = flagsBuilder.SelectAsArray((flag, byteType) => new TypedConstant(byteType, TypedConstantKind.Primitive, flag), byteType);
1602ImmutableArray.Create(new TypedConstant(byteType, TypedConstantKind.Primitive, nullableValue)));
1622ImmutableArray.Create(new TypedConstant(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value)));
1664var transformFlags = builder.SelectAsArray((flag, constantType) => new TypedConstant(constantType, TypedConstantKind.Primitive, flag), booleanType);
Symbols\Compilation_WellKnownMembers.cs (10)
471new TypedConstant(systemByte, TypedConstantKind.Primitive, scale),
472new TypedConstant(systemByte, TypedConstantKind.Primitive, (byte)(isNegative ? 128 : 0)),
473new TypedConstant(systemUnit32, TypedConstantKind.Primitive, high),
474new TypedConstant(systemUnit32, TypedConstantKind.Primitive, mid),
475new TypedConstant(systemUnit32, TypedConstantKind.Primitive, low)
481var ticks = new TypedConstant(GetSpecialType(SpecialType.System_Int64), TypedConstantKind.Primitive, value.Ticks);
818new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, new TypedConstant(boolType, TypedConstantKind.Primitive, allowMultiple)),
819new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__Inherited, new TypedConstant(boolType, TypedConstantKind.Primitive, inherited)));
849new TypedConstant(constantType, TypedConstantKind.Primitive, name), stringType);
896var result = flagsBuilder.SelectAsArray((flag, constantType) => new TypedConstant(constantType, TypedConstantKind.Primitive, flag), booleanType);
Symbols\Source\SourceAssemblySymbol.cs (5)
1834var typedConstantTrue = new TypedConstant(boolType, TypedConstantKind.Primitive, value: true);
1972var typedConstantNoStringInterning = new TypedConstant(int32Type, TypedConstantKind.Primitive, Cci.Constants.CompilationRelaxations_NoStringInterning);
1991var typedConstantTrue = new TypedConstant(boolType, TypedConstantKind.Primitive, value: true);
2025var typedConstant = new TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyContainer);
2035var typedConstant = new TypedConstant(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyFile);
Symbols\Source\SourceNamedTypeSymbol.cs (4)
1693new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.ByRefLikeMarker), // message
1694new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true
1699ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))),
1712var defaultMemberNameConstant = new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, defaultMemberName);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (107)
Attributes\AttributeTests.cs (73)
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");
1439a.VerifyValue(0, TypedConstantKind.Primitive, "");
1443a.VerifyValue(0, TypedConstantKind.Primitive, true);
1451a.VerifyValue(0, TypedConstantKind.Primitive, "MyKey.snk");
1455a.VerifyValue(0, TypedConstantKind.Primitive, "Key Name");
1459a.VerifyValue(0, TypedConstantKind.Primitive, "1.2.*");
1463a.VerifyValue(0, TypedConstantKind.Primitive, "4.3.2.100");
1520attrs.First().VerifyValue<object>(0, TypedConstantKind.Primitive, null);
1606attrs.First().VerifyValue(0, TypedConstantKind.Primitive, true);
1711attrs.First().VerifyNamedArgumentValue<object>(0, "O", TypedConstantKind.Primitive, null);
3106attrs[1].VerifyNamedArgumentValue<ushort>(0, "UShortField", TypedConstantKind.Primitive, 1234);
3117attrs[0].VerifyNamedArgumentValue<uint>(0, "UIntField", TypedConstantKind.Primitive, 1230);
3131attrs[0].VerifyValue<object>(0, TypedConstantKind.Primitive, null);
3132attrs[0].VerifyValue<long>(1, TypedConstantKind.Primitive, 256);
3133attrs[0].VerifyValue<float>(2, TypedConstantKind.Primitive, 0);
3134attrs[0].VerifyValue<short>(3, TypedConstantKind.Primitive, -1);
3138attrs[1].VerifyValue<long>(1, TypedConstantKind.Primitive, 265);
3139attrs[1].VerifyValue<float>(2, TypedConstantKind.Primitive, -0.0001f);
3140attrs[1].VerifyValue<short>(3, TypedConstantKind.Primitive, 2);
3178attrs.First().VerifyValue<byte>(1, TypedConstantKind.Primitive, 255);
3179attrs.First().VerifyValue<sbyte>(2, TypedConstantKind.Primitive, -128);
3220attrs.First().VerifyNamedArgumentValue<object>(0, "ObjectField", TypedConstantKind.Primitive, 2);
3533attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "MultipleArgumentsToParamsParameter");
3540attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NoArgumentsToParamsParameter");
3547attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NullArgumentToParamsParameter");
4089attr.VerifyNamedArgumentValue(0, "Inherited", TypedConstantKind.Primitive, false);
4090attr.VerifyNamedArgumentValue(1, "AllowMultiple", TypedConstantKind.Primitive, true);
4140attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 4);
4141attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 5);
4143attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6);
4183attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3);
4184attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4);
4185attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5);
4187attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6);
4229attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2);
4230attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 1);
4272attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3);
4273attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4);
4274attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5);
4276attrs.First().VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, 6);
4318attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 2);
4521attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2);
4527attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2);
4968enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new bool());
4970enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new sbyte());
4972enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new byte());
4974enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new short());
4976enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new ushort());
4978enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new int());
4980enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new uint());
4982enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new char());
4984enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new float());
4986enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new Single());
4988enumerator.Current.VerifyNamedArgumentValue(0, "X", TypedConstantKind.Primitive, new double());
5253attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null);
5259attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 1);
5314attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null);
5318attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null);
5326attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null);
5330attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null);
5616attributes[0].VerifyValue(0, TypedConstantKind.Primitive, value);
9419attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null);
9501attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null);
9513attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, "A");
9514attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, "A");
9656attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null);
9731attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null);
9743attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, 1);
9744attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, 1);
Attributes\AttributeTests_WellKnownAttributes.cs (29)
141attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1);
165attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123");
177attrSym.VerifyValue(0, TypedConstantKind.Primitive, false);
178attrSym.VerifyNamedArgumentValue(0, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true);
267attrSym.VerifyValue(0, TypedConstantKind.Primitive, false);
273attrSym.VerifyNamedArgumentValue(0, "BestFitMapping", TypedConstantKind.Primitive, true);
275attrSym.VerifyNamedArgumentValue(2, "SetLastError", TypedConstantKind.Primitive, true);
276attrSym.VerifyNamedArgumentValue(3, "ThrowOnUnmappableChar", TypedConstantKind.Primitive, true);
286attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ProgId");
290attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123);
293attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1);
307attrSym.VerifyValue(0, TypedConstantKind.Primitive, true);
310attrSym.VerifyValue(1, TypedConstantKind.Primitive, "EGoo, InteropAttribute, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
322attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message");
323attrSym.VerifyValue(1, TypedConstantKind.Primitive, false);
417attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99uL);
425attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref");
436attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0f);
456attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100);
472attrSym.VerifyNamedArgumentValue(0, "Size", TypedConstantKind.Primitive, 16);
473attrSym.VerifyNamedArgumentValue(1, "Pack", TypedConstantKind.Primitive, 8);
483attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0);
2480attrSym.VerifyValue(0, TypedConstantKind.Primitive, "unmanaged.dll");
2483attrSym.VerifyNamedArgumentValue(1, "SetLastError", TypedConstantKind.Primitive, true);
2488attrSym.VerifyValue(0, TypedConstantKind.Primitive, "user32.dll");
2491attrSym.VerifyNamedArgumentValue(1, "ExactSpelling", TypedConstantKind.Primitive, false);
2492attrSym.VerifyNamedArgumentValue(2, "EntryPoint", TypedConstantKind.Primitive, "MessageBox");
5158attrSym.VerifyNamedArgumentValue(0, "AllowMultiple", TypedConstantKind.Primitive, true);
5164attrSym.VerifyNamedArgumentValue(0, "AllowMultiple", TypedConstantKind.Primitive, false);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (80)
Symbols\Metadata\PE\LoadingAttributes.cs (68)
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");
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");
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');
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);
385c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1");
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);
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);
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));
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");
1183attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.6.1055.0");
1187attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.6.1055.0");
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\TypedConstantTests.cs (11)
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),
100new TypedConstant(_stringType, TypedConstantKind.Primitive, null),
101new TypedConstant(_systemType, TypedConstantKind.Primitive, null));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.Features (4)
Microsoft.CodeAnalysis.UnitTests (11)
CommonTypedConstantTests.cs (11)
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),
65new TypedConstant(_stringType, TypedConstantKind.Primitive, null),
66new TypedConstant(_enumString1, TypedConstantKind.Primitive, null));
Microsoft.CodeAnalysis.VisualBasic (30)
Symbols\WellKnownMembers.vb (6)
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)
737Return New TypedConstant(constantType, TypedConstantKind.Primitive, name)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (51)
Attributes\AttributeTests.vb (32)
215attrs(0).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.UnitTests")
216attrs(1).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp")
217attrs(2).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.UnitTests")
218attrs(3).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.Test.Utilities")
219attrs(4).VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.VisualBasic")
272Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
277Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
287Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
292Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
297Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
302Assert.Equal(TypedConstantKind.Primitive, a.CommonConstructorArguments(0).Kind)
358attrs(0).VerifyValue(0, TypedConstantKind.Primitive, 4)
653attrs(0).VerifyValue(Of Object)(0, "O", TypedConstantKind.Primitive, Nothing)
778attrs(1).VerifyValue(Of UShort)(0, "UShortField", TypedConstantKind.Primitive, 1234)
782attrs(4).VerifyValue(Of UShort)(0, "UShortField", TypedConstantKind.Primitive, 1234)
794attrs(0).VerifyValue(0, "UIntField", TypedConstantKind.Primitive, 1230)
803attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, Nothing)
804attrs(0).VerifyValue(Of Long)(1, TypedConstantKind.Primitive, 256)
805attrs(0).VerifyValue(Of Single)(2, TypedConstantKind.Primitive, 0)
806attrs(0).VerifyValue(Of Short)(3, TypedConstantKind.Primitive, -1)
810attrs(1).VerifyValue(Of Long)(1, TypedConstantKind.Primitive, 265)
811attrs(1).VerifyValue(Of Single)(2, TypedConstantKind.Primitive, -0.0001F)
812attrs(1).VerifyValue(Of Short)(3, TypedConstantKind.Primitive, 2)
854attrs(0).VerifyValue(Of Byte)(1, TypedConstantKind.Primitive, 255)
855attrs(0).VerifyValue(Of SByte)(2, TypedConstantKind.Primitive, -128)
907attrs(0).VerifyValue(Of Object)(0, "ObjectField", TypedConstantKind.Primitive, 2)
1013attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "f1 return type")
1017attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "p1 return type")
1022attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "p2 return type")
1026attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, "f2 returns an integer")
1170attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Primitive, 1)
1172attrs(2).VerifyValue(Of Object)(0, "X", TypedConstantKind.Primitive, 1)
Attributes\AttributeTests_WellKnownAttributes.vb (10)
368attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99UL)
376attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref")
386attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0.0F)
400attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123456)
406attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100)
422attrSym.VerifyValue(0, "Size", TypedConstantKind.Primitive, 16)
423attrSym.VerifyValue(1, "Pack", TypedConstantKind.Primitive, 8)
433attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0)
1247Assert.Equal(TypedConstantKind.Primitive, attrSym.CommonNamedArguments(1).Value.Kind)
3892typeAttribute.VerifyNamedArgumentValue(0, "MayLeakOnAbort", TypedConstantKind.Primitive, True)
Emit\CompilationEmitTests.vb (6)
3293typeAttribute.VerifyNamedArgumentValue(0, "RemotingConfiguration", TypedConstantKind.Primitive, True)
3303typeAttribute.VerifyNamedArgumentValue(0, "UnmanagedCode", TypedConstantKind.Primitive, True)
3323typeAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User1")
3333typeAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User2")
3348methodAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User3")
3358methodAttribute.VerifyNamedArgumentValue(0, "Role", TypedConstantKind.Primitive, "User4")
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.Gen.Metrics (3)
Microsoft.Gen.MetricsReports (3)