190 references to Array
Microsoft.CodeAnalysis (6)
Microsoft.CodeAnalysis.CSharp (13)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (88)
Attributes\AttributeTests.cs (86)
654Assert.Equal(TypedConstantKind.Array, attributeData.ConstructorArguments.Single().Kind);
1029Assert.Equal(TypedConstantKind.Array, arguments0[2].Kind);
1036Assert.Equal(TypedConstantKind.Array, arguments1[2].Kind);
1716attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { typeof(string) });
1721attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", typeof(string), 3.1415926 });
1724attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { typeof(string) } });
3122attrs[0].VerifyValue(0, TypedConstantKind.Array, new char[] { 'q', 'c' });
3135attrs[0].VerifyNamedArgumentValue<ulong[]>(0, "AryField", TypedConstantKind.Array, new ulong[] { 0, 1, 12345657 });
3177attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 0, "", null });
3180attrs.First().VerifyNamedArgumentValue<object[]>(0, "AryProp", TypedConstantKind.Array, new object[] { new object[] { "", typeof(IList<string>) } });
3219attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 1, null, "Hi" });
3451attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3452attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" });
3464attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3465attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" });
3534attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { 4, 5, 6 });
3541attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { });
3548attr.VerifyValue<int[]>(1, TypedConstantKind.Array, null);
3590attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3591attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" });
3603attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3604attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" });
3684attrs.First().VerifyValue(0, TypedConstantKind.Array, (object[])null);
9413attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9414attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1);
9415attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1);
9418attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9420attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9424attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9425attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9426attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3);
9494attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9495attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1);
9496attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1);
9500attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9502attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9507attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9508attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9509attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3);
9512attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { "A" });
9578attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9579attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1);
9580attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1);
9583attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9584attrs2[1].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9585attrs2[2].VerifyValue(0, TypedConstantKind.Array, (string[])null);
9589attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9590attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9594attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4);
9595attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4);
9596attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4);
9651attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9652attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1);
9655attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9657attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9661attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9662attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9663attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3);
9725attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9726attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1);
9730attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9732attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null);
9737attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9738attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9739attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3);
9742attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { 1 });
9805attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1);
9806attrs1[1].VerifyValue(0, TypedConstantKind.Array, new object[] { value1 });
9807attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1);
9811attrs2[0].VerifyValue(0, TypedConstantKind.Array, value2);
9812attrs2[1].VerifyValue(0, TypedConstantKind.Array, value2);
9816attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3);
9817attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3);
9821attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4);
9822attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4);
9823attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4);
9875attrs[0].VerifyValue(0, TypedConstantKind.Array, nullArray);
9877attrs[1].VerifyValue(0, TypedConstantKind.Array, emptyArray);
9879attrs[2].VerifyValue(0, TypedConstantKind.Array, nullArray);
9880attrs[2].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray);
9882attrs[3].VerifyValue(0, TypedConstantKind.Array, emptyArray);
9883attrs[3].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray);
9885attrs[4].VerifyValue(0, TypedConstantKind.Array, nullArray);
9886attrs[4].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray);
9888attrs[5].VerifyValue(0, TypedConstantKind.Array, emptyArray);
9889attrs[5].VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Symbols\Metadata\PE\LoadingAttributes.cs (14)
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 });
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 });
1005attrSym.VerifyValue(0, TypedConstantKind.Array, new sbyte[] { -1, 0, 1 });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.VisualBasic (11)
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)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (31)
Attributes\AttributeTests.vb (30)
657attrs(0).VerifyValue(0, TypedConstantKind.Array, {GetType(String)})
661attrs(0).VerifyValue(Of Object())(0, TypedConstantKind.Array, {1, "two", GetType(String), 3.1415926})
663attrs(0).VerifyValue(0, TypedConstantKind.Array, {New Object() {GetType(String)}})
799attrs(0).VerifyValue(0, TypedConstantKind.Array, {"q"c, "c"c})
807attrs(0).VerifyValue(Of ULong())(0, "AryField", TypedConstantKind.Array, New ULong() {0, 1, 12345657})
853attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Array, New Object() {0, "", Nothing})
856attrs(0).VerifyValue(Of Object())(0, "AryProp", TypedConstantKind.Array, New Object() {New Object() {"", GetType(IList(Of String))}})
906attrs(0).VerifyValue(Of Object)(0, TypedConstantKind.Array, New Object() {1, Nothing, "Hi"})
941attrs(0).VerifyValue(Of Char())(0, TypedConstantKind.Array, New Char() {" "c, Nothing})
942attrs(0).VerifyValue(Of String())(1, TypedConstantKind.Array, New String() {""})
952attrs(0).VerifyValue(Of Char())(0, TypedConstantKind.Array, New Char() {" "c, Nothing})
953attrs(0).VerifyValue(Of String())(1, TypedConstantKind.Array, New String() {""})
1171attrs(1).VerifyValue(Of Object)(0, TypedConstantKind.Array, New String() {"a", "b"})
1173attrs(3).VerifyValue(Of Object)(0, "X", TypedConstantKind.Array, New String() {"a", "b"})
4327methods(0).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Integer() {1, 2, 3})
4328methods(1).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {1, 2, 3})
4329methods(2).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New String() {"A", "B", "C"})
4330methods(3).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {"A", "B", "C"})
4331methods(4).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {}) ' Value was invalid.
4332methods(5).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {DirectCast({1, 2, 3}, Object), DirectCast({"A", "B", "C"}, Object)})
4398attrs(0).VerifyValue(0, TypedConstantKind.Array, nullArray)
4400attrs(1).VerifyValue(0, TypedConstantKind.Array, emptyArray)
4402attrs(2).VerifyValue(0, TypedConstantKind.Array, nullArray)
4403attrs(2).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray)
4405attrs(3).VerifyValue(0, TypedConstantKind.Array, emptyArray)
4406attrs(3).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, nullArray)
4408attrs(4).VerifyValue(0, TypedConstantKind.Array, nullArray)
4409attrs(4).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray)
4411attrs(5).VerifyValue(0, TypedConstantKind.Array, emptyArray)
4412attrs(5).VerifyNamedArgumentValue(0, fieldName, TypedConstantKind.Array, emptyArray)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (14)
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})
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (2)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)