1522 references to First
GenerateDocumentationAndConfigFiles (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
ILLink.CodeFixProvider (1)
Metrics (5)
Metrics.Legacy (5)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.Analyzers (8)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.CodeStyle.Fixes (23)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
Microsoft.CodeAnalysis.CSharp (14)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (28)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (25)
CommandLineTests.cs (25)
824Assert.Equal((int)ErrorCode.ERR_CantHaveWin32ResAndIcon, parsedArgs.Errors.First().Code);
828Assert.Equal((int)ErrorCode.ERR_CantHaveWin32ResAndManifest, parsedArgs.Errors.First().Code);
832Assert.Equal((int)ErrorCode.ERR_NoFileSpec, parsedArgs.Errors.First().Code);
833Assert.Equal(1, parsedArgs.Errors.First().Arguments.Count);
837Assert.Equal((int)ErrorCode.ERR_NoFileSpec, parsedArgs.Errors.First().Code);
838Assert.Equal(1, parsedArgs.Errors.First().Arguments.Count);
842Assert.Equal((int)ErrorCode.ERR_NoFileSpec, parsedArgs.Errors.First().Code);
843Assert.Equal(1, parsedArgs.Errors.First().Arguments.Count);
1910Assert.Equal((int)ErrorCode.WRN_DefineIdentifierRequired, parsedArgs.Errors.First().Code);
1911Assert.Equal("4X", parsedArgs.Errors.First().Arguments[0]);
4521Assert.Equal((int)ErrorCode.ERR_BadPlatformType, parsedArgs.Errors.First().Code);
4562Assert.Equal((int)ErrorCode.ERR_BadBaseNumber, parsedArgs.Errors.First().Code);
4570Assert.Equal((int)ErrorCode.ERR_BadBaseNumber, parsedArgs.Errors.First().Code);
4574Assert.Equal((int)ErrorCode.ERR_SwitchNeedsNumber, parsedArgs.Errors.First().Code);
4578Assert.Equal((int)ErrorCode.ERR_BadBaseNumber, parsedArgs.Errors.First().Code);
8358Assert.Equal((int)ErrorCode.ERR_BadSwitch, parsedArgs.Errors.First().Code);
8362Assert.Equal((int)ErrorCode.ERR_BadSwitch, parsedArgs.Errors.First().Code);
8366Assert.Equal((int)ErrorCode.ERR_BadSwitch, parsedArgs.Errors.First().Code);
8370Assert.Equal((int)ErrorCode.ERR_BadSwitch, parsedArgs.Errors.First().Code);
9747Assert.Equal((int)ErrorCode.ERR_SwitchNeedsString, parsedArgs.Errors.First().Code);
9751Assert.Equal((int)ErrorCode.ERR_SwitchNeedsString, parsedArgs.Errors.First().Code);
9755Assert.Equal((int)ErrorCode.ERR_SwitchNeedsString, parsedArgs.Errors.First().Code);
9813Assert.Equal((int)ErrorCode.FTL_InvalidInputFileName, parsedArgs.Errors.First().Code);
15993symbolContext.ReportDiagnostic(Diagnostic.Create(Warning01, symbolContext.Symbol.Locations.First()));
16010symbolContext.ReportDiagnostic(Diagnostic.Create(Warning02, symbolContext.Symbol.Locations.First()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (139)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (604)
Attributes\AttributeTests.cs (70)
1496Assert.Equal("A.XAttribute", attrs.First().AttributeClass.ToDisplayString());
1520attrs.First().VerifyValue<object>(0, TypedConstantKind.Primitive, null);
1606attrs.First().VerifyValue(0, TypedConstantKind.Primitive, true);
1607Assert.Equal("System.CLSCompliantAttribute", attrs.First().AttributeClass.ToDisplayString());
1709Assert.Equal("AObjectAttribute(typeof(object), O = null)", attrs.First().ToString());
1710attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeof(object));
1711attrs.First().VerifyNamedArgumentValue<object>(0, "O", TypedConstantKind.Primitive, null);
1715Assert.Equal("AObjectAttribute({typeof(string)})", attrs.First().ToString());
1716attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { typeof(string) });
1720Assert.Equal(@"AObjectAttribute({1, ""two"", typeof(string), 3.1415926})", attrs.First().ToString());
1721attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", typeof(string), 3.1415926 });
1723Assert.Equal(@"AObjectAttribute({{typeof(string)}})", attrs.First().ToString());
1724attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { typeof(string) } });
3177attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 0, "", null });
3178attrs.First().VerifyValue<byte>(1, TypedConstantKind.Primitive, 255);
3179attrs.First().VerifyValue<sbyte>(2, TypedConstantKind.Primitive, -128);
3180attrs.First().VerifyNamedArgumentValue<object[]>(0, "AryProp", TypedConstantKind.Array, new object[] { new object[] { "", typeof(IList<string>) } });
3218Assert.Equal(@"CustomAttribute.DerivedAttribute({1, null, ""Hi""}, ObjectField = 2)", attrs.First().ToString());
3219attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 1, null, "Hi" });
3220attrs.First().VerifyNamedArgumentValue<object>(0, "ObjectField", TypedConstantKind.Primitive, 2);
3451attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3452attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" });
3454Assert.True(attrs.First().AttributeConstructor.Parameters.Last().IsParams);
3455Assert.True(attrs.First().AttributeConstructor.Parameters.Last().IsParamsArray);
3456Assert.False(attrs.First().AttributeConstructor.Parameters.Last().IsParamsCollection);
3464attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3465attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" });
3590attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3591attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" });
3593Assert.True(attrs.First().AttributeConstructor.Parameters.Last().IsParams);
3594Assert.True(attrs.First().AttributeConstructor.Parameters.Last().IsParamsArray);
3595Assert.False(attrs.First().AttributeConstructor.Parameters.Last().IsParamsCollection);
3603attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' });
3604attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" });
3639attrs.First().VerifyValue(0, TypedConstantKind.Type, typeof(Object));
3684attrs.First().VerifyValue(0, TypedConstantKind.Array, (object[])null);
3795var attr = attrs.First();
3801attr = attrs.First();
3807attr = attrs.First();
3816attr = attrs.First();
3830attr = attrs.First();
4083var attr = attrs.First();
4098Assert.Equal(@"AttributeTest.A(AttributeTest.X.Three)", attrs.First().ToString());
4104Assert.Equal(@"AttributeTest.A(5)", attrs.First().ToString());
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);
4227Assert.Equal(2, attrs.First().CommonConstructorArguments.Length);
4229attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2);
4230attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 1);
4232Assert.Equal(0, attrs.First().CommonNamedArguments.Length);
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);
4316var attr = attrs.First();
4320Assert.Equal(0, attrs.First().CommonNamedArguments.Length);
4901var ca = goo.GetAttributes().First().CommonConstructorArguments.First();
5177var typeParameter = type.TypeParameters.First();
5495attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
5500attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
5506attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
5513attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
5522attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
5529attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg);
Microsoft.CodeAnalysis.CSharp.Features (33)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (135)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (206)
Symbols\Metadata\PE\LoadingAttributes.cs (38)
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");
385c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1");
388var attr = property1.GetMethod.GetReturnTypeAttributes().First();
394attr = function1.GetReturnTypeAttributes().First();
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>>>");
496var t = field.GetAttributes().First().CommonConstructorArguments.Single().Type;
698var ctor = attrObj.InstanceConstructors.First();
705var msym = attrObj.InstanceConstructors.First();
717attrSym = mem.GetAttributes().First();
781var modattr = assemblies[0].Modules[0].GetAttributes().First();
795var attrSym = field.GetAttributes().First();
863mem.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, 10);
895attrSym = mem2.GetAttributes().First();
929attrSym = assemblies[0].Modules[0].GetAttributes().First();
964var attrSym = tp.GetAttributes().First();
986attrSym = mtd.GetAttributes().First();
995attrSym = mtd.GetReturnTypeAttributes().First();
1114Assert.Equal(0, fld.GetAttributes().First().CommonNamedArguments.Length);
1119Assert.Equal(-1, prop.GetAttributes().First().CommonConstructorArguments[0].Value);
1210var attr1 = exprNS.GetTypeMembers("BinaryExpression").First().GetAttribute(dbgProxyAttr);
1215attr1 = exprNS.GetTypeMembers("TypeBinaryExpression").First().GetAttribute(dbgProxyAttr);
1234var prop = mems.First() as PropertySymbol;
1241var attr = prop.GetAttributes().First();
1444Assert.Empty(parameters.First().GetAttributes());
1445Assert.Equal(parameters.First().ExplicitDefaultValue, -7m);
1471Assert.Equal(parameters.First().ExplicitDefaultValue, -7m);
1472Assert.Empty(parameters.First().GetAttributes());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (15)
Microsoft.CodeAnalysis.EditorFeatures (8)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (56)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
Microsoft.Extensions.Options.SourceGeneration (4)
Microsoft.Interop.SourceGeneration (1)
Microsoft.ML.Tests (2)
Microsoft.VisualStudio.LanguageServices (5)
Mvc.Analyzers.Test (22)
Mvc.Api.Analyzers.Test (40)
Roslyn.Diagnostics.Analyzers (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();
Roslyn.Diagnostics.CSharp.Analyzers (4)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
Test.Utilities (4)
Text.Analyzers (8)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
80return types.First();