4729 references to Select
AnalyzerRunner (2)
ApiExplorerWebSite (1)
Aspire.Azure.Security.KeyVault.Tests (2)
Aspire.Dashboard (14)
ResourceService\Partials.cs (3)
51HealthReports = HealthReports.Select(ToHealthReportViewModel).OrderBy(vm => vm.Name).ToImmutableArray(),
78.Select(e => new EnvironmentVariableViewModel(e.Name, e.Value, e.IsFromSpec))
102.Select(c => new CommandViewModel(c.Name, MapState(c.State), c.DisplayName, c.DisplayDescription, c.ConfirmationMessage, c.Parameter, c.IsHighlighted, c.IconName, MapIconVariant(c.IconVariant)))
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (4)
Aspire.EndToEnd.Tests (4)
Aspire.Hosting (9)
Aspire.Hosting.Analyzers (3)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.AppContainers (3)
Aspire.Hosting.Azure.Tests (1)
Aspire.Hosting.Dapr (3)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (6)
Aspire.Playground.Tests (6)
Aspire.Workload.Tests (9)
AzureSearch.ApiService (1)
BasicTestApp (2)
BasicWebSite (1)
BlazorServerApp (1)
BlazorUnitedApp (1)
BoundTreeGenerator (2)
BuildActionTelemetryTable (2)
BuildBoss (5)
BuildValidator (2)
CodeGenerator (20)
ConfigurationSchemaGenerator (2)
ControllersFromServicesWebSite (2)
csc (1)
CSharpErrorFactsGenerator (1)
CSharpSyntaxGenerator (19)
DaprServiceB (1)
DnnAnalyzer (1)
dotnet-dev-certs (1)
dotnet-getdocument (2)
dotnet-openapi (1)
dotnet-svcutil-lib (27)
CommandProcessorOptions.cs (7)
165fileOptions.AddWarning(string.Format(SR.WrnExtraParamsOnInputFileParamIgnoredFormat, disallowedSwitchesOnParamsFilesProvided.Select(s => $"'{s.Name}'").Aggregate((msg, n) => $"{msg}, '{n}'")), 0);
305this.AddWarning(string.Format(SR.WrnUnexpectedInputsFormat, this.Inputs.Select(i => $"{i}''").Aggregate((msg, i) => $"{msg}, {i}")));
513var svcRefNames = paramsFiles.Select(pf => { PathHelper.GetRelativePath(Path.GetDirectoryName(pf), new DirectoryInfo(projectDir), out var relPath); return relPath; })
514.Select(f => $"'{f}'").Aggregate((files, f) => $"{files}, {f}");
662invalidNamespaces.Select(n => $"'{n.Key},{n.Value}'").Aggregate((msg, n) => $"{msg}, {n}")));
722var inputFiles = Metadata.MetadataFileNameManager.ResolveFiles(metadataUri.LocalPath).Select(f => f.FullName);
1032.Select(o => $"{o.Name}:[{OptionValueParser.GetTelemetryValue(o)}]")
dotnet-user-jwts (11)
dotnet-user-secrets (1)
FilesWebSite (1)
FormatterWebSite (1)
GetDocument.Insider (1)
HealthChecksSample (2)
HostedBlazorWebassemblyApp.Server (1)
HtmlGenerationWebSite (1)
HttpStress (5)
Identity.DefaultUI.WebSite (2)
IdentitySample.Mvc (1)
IIS.FunctionalTests (3)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IIS.ShadowCopy.Tests (2)
IISExpress.FunctionalTests (3)
illink (6)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (4)
ILLink.Tasks (1)
Infrastructure.Common (3)
InMemory.FunctionalTests (7)
installer.tasks (15)
InteractiveHost.UnitTests (1)
Interop.FunctionalTests (6)
InteropClient (5)
IOperationGenerator (6)
Keycloak.ApiService (1)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.Analyzers.Local (3)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.Arcade.Common (4)
Microsoft.Arcade.Test.Common (3)
Microsoft.AspNetCore.Analyzers.Test (1)
Microsoft.AspNetCore.Antiforgery.Test (7)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.App.Analyzers.Test (4)
Microsoft.AspNetCore.App.UnitTests (14)
Microsoft.AspNetCore.Authentication.Core (3)
Microsoft.AspNetCore.Authentication.JwtBearer (2)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (6)
OpenIdConnectHandler.cs (5)
112message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
127message = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
316var message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
643authorizationResponse = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
670authorizationResponse = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.Test (7)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.BrowserTesting (1)
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.Authorization.Tests (2)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (8)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Server.Tests (6)
Microsoft.AspNetCore.Components.Tests (15)
Microsoft.AspNetCore.Components.Web.Tests (3)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Components.WebView.Test (2)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.DataProtection.Tests (7)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Diagnostics (6)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (4)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (6)
Microsoft.AspNetCore.Grpc.Swagger (7)
Microsoft.AspNetCore.Grpc.Swagger.Tests (3)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.Hosting.Tests (4)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (7)
Microsoft.AspNetCore.Http.Results.Tests (5)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.HttpLogging.Tests (6)
Microsoft.AspNetCore.HttpOverrides.Tests (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
Microsoft.AspNetCore.Identity.FunctionalTests (6)
Microsoft.AspNetCore.Identity.InMemory.Test (8)
Microsoft.AspNetCore.Identity.Test (4)
Microsoft.AspNetCore.Identity.UI (1)
Microsoft.AspNetCore.InternalTesting (5)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Localization.Tests (2)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
Microsoft.AspNetCore.Mvc.Core (29)
Microsoft.AspNetCore.Mvc.Core.Test (31)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.Cors.Test (1)
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
Microsoft.AspNetCore.Mvc.FunctionalTests (18)
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.AspNetCore.Mvc.Razor.Test (7)
Microsoft.AspNetCore.Mvc.RazorPages (8)
Microsoft.AspNetCore.Mvc.RazorPages.Test (8)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (24)
SelectTagHelperTest.cs (20)
320var savedDisabled = items.Select(item => item.Disabled).ToList();
321var savedGroup = items.Select(item => item.Group).ToList();
322var savedSelected = items.Select(item => item.Selected).ToList();
323var savedText = items.Select(item => item.Text).ToList();
324var savedValue = items.Select(item => item.Value).ToList();
349Assert.Equal(savedDisabled, items.Select(item => item.Disabled));
350Assert.Equal(savedGroup, items.Select(item => item.Group));
351Assert.Equal(savedSelected, items.Select(item => item.Selected));
352Assert.Equal(savedText, items.Select(item => item.Text));
353Assert.Equal(savedValue, items.Select(item => item.Value));
501var savedDisabled = items.Select(item => item.Disabled).ToList();
502var savedGroup = items.Select(item => item.Group).ToList();
503var savedSelected = items.Select(item => item.Selected).ToList();
504var savedText = items.Select(item => item.Text).ToList();
505var savedValue = items.Select(item => item.Value).ToList();
529Assert.Equal(savedDisabled, items.Select(item => item.Disabled));
530Assert.Equal(savedGroup, items.Select(item => item.Group));
531Assert.Equal(savedSelected, items.Select(item => item.Selected));
532Assert.Equal(savedText, items.Select(item => item.Text));
533Assert.Equal(savedValue, items.Select(item => item.Value));
Microsoft.AspNetCore.Mvc.Test (7)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (96)
Rendering\HtmlHelperSelectTest.cs (80)
327var savedDisabled = selectList.Select(item => item.Disabled).ToList();
328var savedGroup = selectList.Select(item => item.Group).ToList();
329var savedSelected = selectList.Select(item => item.Selected).ToList();
330var savedText = selectList.Select(item => item.Text).ToList();
331var savedValue = selectList.Select(item => item.Value).ToList();
338Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
339Assert.Equal(savedGroup, selectList.Select(item => item.Group));
340Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
341Assert.Equal(savedText, selectList.Select(item => item.Text));
342Assert.Equal(savedValue, selectList.Select(item => item.Value));
355var savedSelected = selectList.Select(item => item.Selected).ToList();
362Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
395var savedSelected = selectList.Select(item => item.Selected).ToList();
402Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
600var savedSelected = selectList.Select(item => item.Selected).ToList();
611Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
624var savedSelected = selectList.Select(item => item.Selected).ToList();
635Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
648var savedSelected = selectList.Select(item => item.Selected).ToList();
659Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
673var savedSelected = selectList.Select(item => item.Selected).ToList();
684Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
694var savedSelected = selectList.Select(item => item.Selected).ToList();
712Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
722var savedSelected = selectList.Select(item => item.Selected).ToList();
735Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
748var savedDisabled = selectList.Select(item => item.Disabled).ToList();
749var savedGroup = selectList.Select(item => item.Group).ToList();
750var savedSelected = selectList.Select(item => item.Selected).ToList();
751var savedText = selectList.Select(item => item.Text).ToList();
752var savedValue = selectList.Select(item => item.Value).ToList();
759Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
760Assert.Equal(savedGroup, selectList.Select(item => item.Group));
761Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
762Assert.Equal(savedText, selectList.Select(item => item.Text));
763Assert.Equal(savedValue, selectList.Select(item => item.Value));
777var savedSelected = selectList.Select(item => item.Selected).ToList();
784Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
798var savedSelected = selectList.Select(item => item.Selected).ToList();
805Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1004var savedSelected = selectList.Select(item => item.Selected).ToList();
1011Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1025var savedSelected = selectList.Select(item => item.Selected).ToList();
1032Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1042var savedSelected = selectList.Select(item => item.Selected).ToList();
1056Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1070var savedSelected = selectList.Select(item => item.Selected).ToList();
1077Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1090var savedDisabled = selectList.Select(item => item.Disabled).ToList();
1091var savedGroup = selectList.Select(item => item.Group).ToList();
1092var savedSelected = selectList.Select(item => item.Selected).ToList();
1093var savedText = selectList.Select(item => item.Text).ToList();
1094var savedValue = selectList.Select(item => item.Value).ToList();
1105Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
1106Assert.Equal(savedGroup, selectList.Select(item => item.Group));
1107Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1108Assert.Equal(savedText, selectList.Select(item => item.Text));
1109Assert.Equal(savedValue, selectList.Select(item => item.Value));
1122var savedSelected = selectList.Select(item => item.Selected).ToList();
1133Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1146var savedSelected = selectList.Select(item => item.Selected).ToList();
1153Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1166var savedSelected = selectList.Select(item => item.Selected).ToList();
1173Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1187var savedDisabled = selectList.Select(item => item.Disabled).ToList();
1188var savedGroup = selectList.Select(item => item.Group).ToList();
1189var savedSelected = selectList.Select(item => item.Selected).ToList();
1190var savedText = selectList.Select(item => item.Text).ToList();
1191var savedValue = selectList.Select(item => item.Value).ToList();
1198Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
1199Assert.Equal(savedGroup, selectList.Select(item => item.Group));
1200Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1201Assert.Equal(savedText, selectList.Select(item => item.Text));
1202Assert.Equal(savedValue, selectList.Select(item => item.Value));
1217var savedSelected = selectList.Select(item => item.Selected).ToList();
1224Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1238var savedSelected = selectList.Select(item => item.Selected).ToList();
1245Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1260var savedSelected = selectList.Select(item => item.Selected).ToList();
1267Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
Microsoft.AspNetCore.OpenApi (8)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (4)
Microsoft.AspNetCore.OpenApi.Tests (7)
Microsoft.AspNetCore.Owin (8)
Microsoft.AspNetCore.ResponseCompression.Tests (2)
Microsoft.AspNetCore.Routing (25)
Microsoft.AspNetCore.Routing.Abstractions (1)
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Microsoft.AspNetCore.Routing.Tests (9)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IIS (6)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (35)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.Shared.Tests (20)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.SignalR.Common (4)
Microsoft.AspNetCore.SignalR.Common.Tests (26)
Internal\Protocol\MemoryBufferWriterTests.cs (12)
82var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
101var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
165var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
181var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
199var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
215var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
232var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
251var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
269var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
289var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
316var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
336var input = Enumerable.Range(0, inputSize).Select(i => (byte)i).ToArray();
Microsoft.AspNetCore.SignalR.Core (4)
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (5)
Microsoft.AspNetCore.SignalR.Tests (3)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.Tests (1)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Microsoft.AspNetCore.WebSockets.Tests (2)
Microsoft.AspNetCore.WebUtilities.Tests (7)
Microsoft.Build (76)
Evaluation\Evaluator.cs (4)
733_usingTaskElements.Select(p => (p.Value, p.Key)),
1113_evaluationLoggingContext.LogWarning("", new BuildEventFileInfo(""), "ChangeWave_InvalidFormat", Traits.Instance.MSBuildDisableFeaturesFromVersion, $"[{String.Join(", ", ChangeWaves.AllWaves.Select(x => x.ToString()))}]");
1116_evaluationLoggingContext.LogWarning("", new BuildEventFileInfo(""), "ChangeWave_OutOfRotation", ChangeWaves.DisabledWave, Traits.Instance.MSBuildDisableFeaturesFromVersion, $"[{String.Join(", ", ChangeWaves.AllWaves.Select(x => x.ToString()))}]");
2507var onlyFallbackSearchPaths = searchPathMatch.SearchPaths.Select(s => _data.ExpandString(s)).ToList();
Instance\ProjectItemInstance.cs (7)
129IEnumerable<ProjectMetadataInstance> directMetadataInstances = directMetadata.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value));
608IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value));
1085_directMetadata.ImportProperties(metadata.Select(kvp => new ProjectMetadataInstance(kvp.Key, kvp.Value, allowItemSpecModifiers: true)));
1452.Select(metadatum => new KeyValuePair<string, string>(metadatum.Name, GetMetadataEscaped(metadatum.Name)));
1790Enumerable.Range(0, count).Select(_ =>
1895.Select(item => new ProjectMetadataInstance(item.Key, item.Value, true /* may be built-in metadata name */));
2063IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key.Name, metadatum.Value));
Microsoft.Build.BuildCheck.UnitTests (1)
Microsoft.Build.CommandLine.UnitTests (1)
Microsoft.Build.Engine.OM.UnitTests (19)
Definition\ProjectItem_Tests.cs (15)
763expectedInclude = expectedInclude.Select(p => setSlashes(p, Path.DirectorySeparatorChar)).ToArray();
2332Assert.Equal(@"a;a", string.Join(";", items.Select(i => i.EvaluatedInclude)));
2343Assert.Equal(@"a.txt;b.cs", string.Join(";", items.Select(i => i.EvaluatedInclude)));
2355Assert.Equal(@"a;c", string.Join(";", items.Select(i => i.EvaluatedInclude)));
2385Assert.Equal(@"a;b", string.Join(";", project.Items.Select(i => i.EvaluatedInclude)));
2402Assert.Equal(@"a;b;c", string.Join(";", project.ItemsIgnoringCondition.Select(i => i.EvaluatedInclude)));
2424items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
2451items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
2485items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "b2", "c2", "g2" });
2498items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "b2", "c2", "g2" });
2528items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "../foo.txt", "/foo/bar.txt" });
2560items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
2597items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "c2", "d2" });
2627items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "b2", "c2", "d2" });
3663.Select(i => (ObjectModelHelpers.ITestItem)new ObjectModelHelpers.ProjectItemTestItemAdapter(i))
Microsoft.Build.Engine.UnitTests (104)
BackEnd\IntrinsicTask_Tests.cs (9)
1779items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
1813items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
1857items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "b2", "c2", "g2" });
1870items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "b2", "c2", "g2" });
1910items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "../foo.txt", "/foo/bar.txt" });
1944items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "d2" });
1982items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "c2", "d2" });
2018items.Select(i => i.EvaluatedInclude).ShouldBe(new[] { "a2", "b2", "c2", "d2" });
4004return lookup.GetItems(itemType).Select(i => (ObjectModelHelpers.ITestItem)new ObjectModelHelpers.ProjectItemInstanceTestItemAdapter(i)).ToList();
FileMatcher_Tests.cs (7)
105foreach (string fullPath in GetFilesComplexGlobbingMatchingInfo.FilesToCreate.Select(i => Path.Combine(testFolder.Path, i.ToPlatformSlash())))
127.Select(i => i.Replace(Path.DirectorySeparatorChar, '\\'))
153Verify(info.Include, info.Excludes?.Select(o => o.Replace('\\', '/')).ToArray(), customMessage: "Excludes directory separator was changed to forward slash");
162Verify(info.Include, info.Excludes?.Select(o => o.ToUpperInvariant()).ToArray(), false, "Excludes were changed to uppercase");
2386var forwardSlashExcludeSpecs = excludeFilespecs.Select(Helpers.ToForwardSlash).ToArray();
2406Func<string[], string[]> normalizeAllFunc = (paths => normalizeAllPaths ? paths.Select(MockFileSystem.Normalize).ToArray() : paths);
2407Func<string[], string[]> normalizeMatching = (paths => normalizeExpectedMatchingFiles ? paths.Select(MockFileSystem.Normalize).ToArray() : paths);
Graph\ProjectGraph_Tests.cs (7)
863projectGraph.EntryPointNodes.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project1Path, project2Path, project3Path, project6Path, project8Path }, ignoreOrder: true);
865projectGraph.GraphRoots.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project1Path, project6Path }, ignoreOrder: true);
872project1Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project2Path, project3Path, project8Path }, ignoreOrder: true);
878project2Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project4Path }, ignoreOrder: true);
884project3Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project5Path }, ignoreOrder: true);
2108var referenceNumbersSet = innerBuildWithCommonReferences.ProjectReferences.Select(r => Path.GetFileNameWithoutExtension(r.ProjectInstance.FullPath)).ToHashSet();
2114referenceNumbersSet = innerBuildWithAdditionalReferences.ProjectReferences.Select(r => Path.GetFileNameWithoutExtension(r.ProjectInstance.FullPath)).ToHashSet();
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (7)
Microsoft.Build.Tasks.Core (20)
Microsoft.Build.Tasks.UnitTests (14)
Microsoft.Build.UnitTests.Shared (12)
Microsoft.Build.Utilities.Core (9)
Microsoft.Cci.Extensions (10)
Microsoft.CodeAnalysis (35)
Microsoft.CodeAnalysis.CodeStyle (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
144.Select(ch =>
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
Microsoft.CodeAnalysis.Collections.Package (2)
Microsoft.CodeAnalysis.CSharp (17)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (26)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (20)
CommandLineTests.cs (17)
513AssertEx.Equal(new[] { "first.cs", "second.cs", "b.cs", "a.cs", "c.cs", "d.cs", "last.cs" }.Select(prependBasePath), resolvedSourceFiles);
515AssertEx.Equal(new[] { RuntimeEnvironment.GetRuntimeDirectory() }.Concat(new[] { @"x", @"..\goo", @"../bar", @"a b" }.Select(prependBasePath)), args.ReferencePaths.ToArray());
1198Select((res) => res.Reference));
1205Select((res) => res.Reference));
1276Select((res) => res.Reference));
1283Select((res) => res.Reference));
1734Enum.GetValues(typeof(LanguageVersion)).Cast<LanguageVersion>().Select(v => v.ToDisplayString()));
1881.Select(v => v.ToDisplayString());
2334new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2340new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2346new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2352new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2358new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2364new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
8859AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
8916AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
8957AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (43)
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (10)
62Assert.True(result.Select(ts => ts.Span.Span).SetEquals(Enumerable(Span.FromBounds(15, 16), Span.FromBounds(18, 19))));
74Assert.True(result.Select(ts => ts.Span.Span).SetEquals(Enumerable(Span.FromBounds(15, 16), Span.FromBounds(18, 19))));
86Assert.True(result.Select(ts => ts.Span.Span).SetEquals(Enumerable(Span.FromBounds(35, 36), Span.FromBounds(36, 37))));
94Assert.True(result.Select(ts => ts.Span.Span).SetEquals(
115Assert.True(result.Select(ts => ts.Span.Span).SetEquals(Enumerable(Span.FromBounds(42, 43), Span.FromBounds(44, 45))));
119Assert.True(result.Select(ts => ts.Span.Span).SetEquals(Enumerable(Span.FromBounds(42, 43), Span.FromBounds(44, 45))));
171AssertEx.Equal(Enumerable(new Span(62, 1), new Span(71, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
183AssertEx.Equal(Enumerable(new Span(62, 1), new Span(71, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
187AssertEx.Equal(Enumerable(new Span(82, 1), new Span(138, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
199AssertEx.Equal(Enumerable(new Span(82, 1), new Span(138, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (36)
CodeGen\CodeGenDeconstructTests.cs (4)
2396var tuple = String.Join(", ", Enumerable.Range(1, i).Select(n => n.ToString()));
2397var variables = String.Join(", ", Enumerable.Range(1, i).Select(n => $"x{n}"));
2398var output = String.Join(@" + "" "" + ", Enumerable.Range(1, i).Select(n => $"x{n}"));
2399var expected = String.Join(" ", Enumerable.Range(1, i).Select(n => n));
CodeGen\CodeGenTupleTest.cs (15)
5883Assert.All(tupleWithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
5960Assert.All(tupleWithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
5979Assert.All(tupleWithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
5998Assert.All(tupleWithSomeNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6016Assert.All(tupleWithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6068Assert.All(tuple8WithoutNames.GetMembers().OfType<IFieldSymbol>().Where(f => f.Name != "Rest").Select(f => f.Locations.FirstOrDefault()),
6093Assert.All(tuple8WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6118Assert.All(tuple9WithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6144Assert.All(tuple9WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6176Assert.All(tuple9WithNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6200Assert.All(tupleWithoutNames.GetMembers().OfType<IFieldSymbol>().Select(f => f.Locations.FirstOrDefault()),
6925ImmutableArray.CreateRange(Enumerable.Range(0, n).Select(_ => annotation));
22859AssertEx.SetEqual(xSymbol.GetMembers().OfType<IFieldSymbol>().Select(f => f.Name),
23995string filler = string.Join("\r\n", Enumerable.Range(1, 1000).Select(i => $"int y{i};"));
23996string parameters = string.Join(", ", Enumerable.Range(1, 2000).Select(i => $"int x{i}"));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (36)
Microsoft.CodeAnalysis.CSharp.Features (44)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
225.Select(s =>
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (81)
Semantics\DelegateTypeTests.cs (11)
3603var exprs = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Select(d => d.Initializer!.Value).ToArray();
10393AssertEx.Equal(expectedInfo, variables.Select(v => getVariableInfo(model, v)));
11092var identifiers = nodes.OfType<InvocationExpressionSyntax>().Where(i => i.Expression is IdentifierNameSyntax id && id.Identifier.Text == "Report").Select(i => i.ArgumentList.Arguments[0].Expression).ToArray();
13187var manyParams = string.Join(", ", range.Select(i => $"int p{i}"));
13188var manyArgs = string.Join(", ", range.Select(i => $"arg{i}: {i * 10}"));
13189var manyTypes = string.Join(",", range.Select(_ => "System.Int32"));
13208var fewArgs = string.Join(", ", range.Skip(1).Select(i => $"arg{i}: {i * 10}"));
13237var manyParams = string.Join(", ", range.Select(i => $"int p{i}"));
13238var manyTypes = string.Join(",", range.Select(_ => "System.Int32"));
13260var manyParams = string.Join(", ", range.Select(i => $"int p{i}"));
13261var manyTypes = string.Join(",", range.Select(_ => "System.Int32"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (41)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (42)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
Microsoft.CodeAnalysis.CSharp.Workspaces (55)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures (21)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (13)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (31)
Tagging\TagSpanIntervalTreeTests.cs (6)
28spans.Select(s => new TagSpan<ITextMarkerTag>(new SnapshotSpan(buffer.CurrentSnapshot, s), new TextMarkerTag(string.Empty))));
83var (tree, buffer) = CreateTree(new string('c', 100), Enumerable.Range(50, count: 50).Select(s => new Span(s, 1)).ToArray());
97var (tree, buffer) = CreateTree(new string('c', 100), Enumerable.Range(0, count: 100).Select(s => new Span(s, 1)).ToArray());
112var (tree, buffer) = CreateTree(new string('c', 100), Enumerable.Range(0, count: 100).Select(s => new Span(s, 1)).ToArray());
126var (tree, buffer) = CreateTree(new string('c', 100), Enumerable.Range(0, count: 100).Select(s => new Span(s, 1)).ToArray());
140var (tree, buffer) = CreateTree(new string('c', 100), Enumerable.Range(0, count: 100).Select(s => new Span(s, 1)).ToArray());
ValueTracking\AbstractBaseValueTrackingTests.cs (2)
45Assert.True(itemInfo.Length == items.Length, $"GetTrackedItemsAsync\n\texpected: [{string.Join(",", itemInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", items)}]");
58Assert.True(childInfo.Length == children.Length, $"GetTrackedItemsAsync on [{item}]\n\texpected: [{string.Join(",", childInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", children)}]");
Microsoft.CodeAnalysis.EditorFeatures.Wpf (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (24)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (48)
Microsoft.CodeAnalysis.Features.Test.Utilities (8)
Microsoft.CodeAnalysis.Features.UnitTests (3)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.LanguageServer (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol (18)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Rebuild (4)
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (2)
Microsoft.CodeAnalysis.Scripting (4)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.Test.Utilities (72)
Diagnostics\CommonDiagnosticAnalyzers.cs (7)
157" + String.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @"
171" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @"
234" + String.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @"
248" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @"
376" + string.Join("," + Environment.NewLine + " ", suppressionKinds.Select(s => $"\"{s}\"")) + @"
474" + string.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @"
495" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @"
Microsoft.CodeAnalysis.UnitTests (66)
Analyzers\AnalyzerConfigTests.cs (23)
205AnalyzerConfig.ReservedKeys.Select(k => "MY_" + k + " = MY_VAL")));
207AnalyzerConfig.ReservedKeys.Select(k => KeyValuePair.Create("my_" + k, "MY_VAL")).ToList(),
353AnalyzerConfig.ReservedValues.Select(v => "MY_KEY" + (index++) + " = " + v.ToUpperInvariant())));
356AnalyzerConfig.ReservedValues.Select(v => KeyValuePair.Create("my_key" + (index++), v)).ToList(),
364AnalyzerConfig.ReservedKeys.Select(k => k + " = MY_VAL")));
366AnalyzerConfig.ReservedKeys.Select(k => KeyValuePair.Create(k, "my_val")).ToList(),
967}, options.Select(o => o.TreeOptions).ToArray());
1017}, options.Select(o => o.TreeOptions).ToArray());
1044}, options.Select(o => o.TreeOptions).ToArray());
1066}, options.Select(o => o.TreeOptions).ToArray());
1088}, options.Select(o => o.TreeOptions).ToArray());
1112}, options.Select(o => o.TreeOptions).ToArray());
1145}, options.Select(o => o.TreeOptions).ToArray());
1167}, options.Select(o => o.TreeOptions).ToArray());
1198}, options.Select(o => o.TreeOptions).ToArray());
1218}, options.Select(o => o.TreeOptions).ToArray());
1228return filePaths.Select(f => set.GetOptionsForSourcePath(f)).ToArray();
1511}, options.Select(o => o.TreeOptions).ToArray());
1541}, options.Select(o => o.TreeOptions).ToArray());
1575}, options.Select(o => o.TreeOptions).ToArray());
2057}, options.Select(o => o.TreeOptions).ToArray());
2073var options = new[] { "/test.cs", "/path/to/file.cs" }.Select(f => set.GetOptionsForSourcePath(f)).ToArray();
2134}, options.Select(o => o.TreeOptions).ToArray());
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (4)
97.AddRange(Enumerable.Range(1, 10).Select(n => new KeyValuePair<int, string?>(n, null)))
100Enumerable.Range(1, 10).Select(n => new KeyValuePair<int, string?>(n, null)),
109Enumerable.Range(1, 11).Select(n => new KeyValuePair<int, string?>(n, null)),
119Enumerable.Range(1, 11).Select(n => new KeyValuePair<int, string?>(n, null)),
Collections\SegmentedCollectionsMarshalTests.cs (18)
584test<Guid>(Enumerable.Range(0, 17).Select(_ => Guid.NewGuid()));
585test<Guid?>(Enumerable.Range(0, 17).Select(_ => (Guid?)Guid.NewGuid()));
586test<string>(Enumerable.Range(0, 17).Select(_ => Guid.NewGuid().ToString()));
587test<CustomClass>(Enumerable.Range(0, 17).Select(_ => new CustomClass()));
588test<ManagedCustomStruct>(Enumerable.Range(0, 17).Select(_ => new ManagedCustomStruct() { Bar = Guid.NewGuid() }));
589test<ManagedCustomStruct?>(Enumerable.Range(0, 17).Select(_ => (ManagedCustomStruct?)new ManagedCustomStruct() { Bar = Guid.NewGuid() }));
590test<UnmanagedCustomStruct>(Enumerable.Range(0, 17).Select(_ => new UnmanagedCustomStruct() { Foo = Guid.NewGuid() }));
591test<UnmanagedCustomStruct?>(Enumerable.Range(0, 17).Select(_ => (UnmanagedCustomStruct?)new UnmanagedCustomStruct() { Foo = Guid.NewGuid() }));
656test<Guid>(Enumerable.Range(0, 17).Select(_ => Guid.NewGuid()));
657test<Guid?>(Enumerable.Range(0, 17).Select(_ => (Guid?)Guid.NewGuid()));
658test<string>(Enumerable.Range(0, 17).Select(_ => Guid.NewGuid().ToString()));
659test<CustomClass>(Enumerable.Range(0, 17).Select(_ => new CustomClass()));
660test<ManagedCustomStruct>(Enumerable.Range(0, 17).Select(_ => new ManagedCustomStruct() { Bar = Guid.NewGuid() }));
661test<ManagedCustomStruct?>(Enumerable.Range(0, 17).Select(_ => (ManagedCustomStruct?)new ManagedCustomStruct() { Bar = Guid.NewGuid() }));
662test<UnmanagedCustomStruct>(Enumerable.Range(0, 17).Select(_ => new UnmanagedCustomStruct() { Foo = Guid.NewGuid() }));
663test<UnmanagedCustomStruct?>(Enumerable.Range(0, 17).Select(_ => (UnmanagedCustomStruct?)new UnmanagedCustomStruct() { Foo = Guid.NewGuid() }));
701SegmentedDictionary<int, TValue> dictionary = new SegmentedDictionary<int, TValue>(Enumerable.Range(0, 17).Select(x => new KeyValuePair<int, TValue>(x, createValue())));
768ImmutableSegmentedDictionary<int, T> immutableDictionary = ImmutableSegmentedDictionary.CreateRange(Enumerable.Range(0, 17).Select(x => new KeyValuePair<int, T>(x, createValue())));
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (113)
Editing\SyntaxGenerator.cs (13)
170name, parameters, typeParameters?.Select(n => TypeParameter(n)), returnType, accessibility, modifiers, statements);
610isRecord: false, name, typeParameters?.Select(TypeParameter), accessibility, modifiers, baseType, interfaceTypes, members);
635isRecord: false, name, typeParameters?.Select(TypeParameter), accessibility, modifiers, interfaceTypes, members);
658name, typeParameters?.Select(n => TypeParameter(n)), accessibility, interfaceTypes, members);
704name, parameters, typeParameters?.Select(n => TypeParameter(n)), returnType, accessibility, modifiers);
769members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)),
777members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)),
783members: type.GetMembers().Where(CanBeDeclared).Select(Declaration)),
790members: type.GetMembers().Where(s => s.Kind == SymbolKind.Field).Select(Declaration)),
894=> WithTypeParameters(declaration, typeParameters.Select(n => TypeParameter(n)));
1444return new SyntaxTokenList(newList.Select(
1849=> GenericName(identifier, typeArguments.Select(TypeExpression));
2009return TupleTypeExpression(elementTypes.Select(type => TupleElementExpression(type, name: null)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
144.Select(ch =>
Microsoft.CodeAnalysis.Workspaces.Desktop (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (14)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (12)
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Microsoft.Data.Analysis (7)
Microsoft.Data.Analysis.Interactive (8)
Microsoft.Data.Analysis.Interactive.Tests (3)
Microsoft.Data.Analysis.PerformanceTests (5)
Microsoft.Data.Analysis.Tests (573)
DataFrameColumn.BinaryOperationTests.cs (495)
21var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
23var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
26var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x));
34var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
36var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
39var verify = Enumerable.Range(1, 10).Select(x => (decimal)(2 * x));
47var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
49var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
52var verify = Enumerable.Range(1, 10).Select(x => (double)(2 * x));
60var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
62var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
65var verify = Enumerable.Range(1, 10).Select(x => (float)(2 * x));
73var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
75var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
78var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x));
86var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
88var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
91var verify = Enumerable.Range(1, 10).Select(x => (long)(2 * x));
99var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
101var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
104var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x));
112var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
114var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
117var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x));
125var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
127var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
130var verify = Enumerable.Range(1, 10).Select(x => (uint)(2 * x));
138var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
140var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
143var verify = Enumerable.Range(1, 10).Select(x => (ulong)(2 * x));
151var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
153var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
156var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x));
164var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
168var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
176var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
180var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x + (decimal)value));
188var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
192var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x + (double)value));
200var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
204var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x + (float)value));
212var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
216var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
224var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
228var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x + (long)value));
236var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
240var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
248var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
252var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
260var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
264var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x + (uint)value));
272var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
276var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x + (ulong)value));
284var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
288var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
296var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
300var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
308var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
312var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x + (decimal)value));
320var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
324var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x + (double)value));
332var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
336var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x + (float)value));
344var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
348var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
356var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
360var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x + (long)value));
368var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
372var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
380var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
384var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
392var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
396var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x + (uint)value));
404var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
408var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x + (ulong)value));
416var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
420var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value));
428var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
430var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
433var verify = Enumerable.Range(1, 10).Select(x => (int)0);
441var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
443var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
446var verify = Enumerable.Range(1, 10).Select(x => (decimal)0);
454var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
456var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
459var verify = Enumerable.Range(1, 10).Select(x => (double)0);
467var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
469var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
472var verify = Enumerable.Range(1, 10).Select(x => (float)0);
480var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
482var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
485var verify = Enumerable.Range(1, 10).Select(x => (int)0);
493var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
495var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
498var verify = Enumerable.Range(1, 10).Select(x => (long)0);
506var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
508var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
511var verify = Enumerable.Range(1, 10).Select(x => (int)0);
519var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
521var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
524var verify = Enumerable.Range(1, 10).Select(x => (int)0);
532var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
534var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
537var verify = Enumerable.Range(1, 10).Select(x => (uint)0);
545var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
547var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
550var verify = Enumerable.Range(1, 10).Select(x => (ulong)0);
558var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
560var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
563var verify = Enumerable.Range(1, 10).Select(x => (int)0);
571var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
575var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value));
583var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
587var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x - (decimal)value));
595var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
599var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x - (double)value));
607var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
611var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x - (float)value));
619var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
623var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value));
631var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
635var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x - (long)value));
643var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
647var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value));
655var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
659var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value));
667var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
671var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x - (uint)value));
679var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
683var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x - (ulong)value));
691var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
695var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value));
703var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
707var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x));
715var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
719var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value - (decimal)x));
727var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
731var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value - (double)x));
739var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
743var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value - (float)x));
751var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
755var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x));
763var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
767var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value - (long)x));
775var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
779var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x));
787var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
791var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x));
799var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
803var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value - (uint)x));
811var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
815var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value - (ulong)x));
823var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
827var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x));
835var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
837var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
840var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x));
848var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
850var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
853var verify = Enumerable.Range(1, 10).Select(x => (decimal)(x * x));
861var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
863var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
866var verify = Enumerable.Range(1, 10).Select(x => (double)(x * x));
874var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
876var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
879var verify = Enumerable.Range(1, 10).Select(x => (float)(x * x));
887var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
889var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
892var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x));
900var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
902var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
905var verify = Enumerable.Range(1, 10).Select(x => (long)(x * x));
913var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
915var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
918var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x));
926var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
928var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
931var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x));
939var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
941var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
944var verify = Enumerable.Range(1, 10).Select(x => (uint)(x * x));
952var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
954var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
957var verify = Enumerable.Range(1, 10).Select(x => (ulong)(x * x));
965var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
967var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
970var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x));
978var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
982var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
990var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
994var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x * (decimal)value));
1002var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1006var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x * (double)value));
1014var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1018var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x * (float)value));
1026var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1030var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1038var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1042var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x * (long)value));
1050var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1054var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1062var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1066var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1074var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1078var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x * (uint)value));
1086var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1090var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x * (ulong)value));
1098var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1102var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1110var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1114var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1122var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1126var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x * (decimal)value));
1134var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1138var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x * (double)value));
1146var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1150var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x * (float)value));
1158var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1162var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1170var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1174var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x * (long)value));
1182var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1186var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1194var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1198var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1206var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1210var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x * (uint)value));
1218var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1222var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x * (ulong)value));
1230var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1234var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value));
1242var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1244var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1247var verify = Enumerable.Range(1, 10).Select(x => (int)(1));
1255var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1257var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
1260var verify = Enumerable.Range(1, 10).Select(x => (decimal)(1));
1268var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1270var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
1273var verify = Enumerable.Range(1, 10).Select(x => (double)(1));
1281var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1283var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
1286var verify = Enumerable.Range(1, 10).Select(x => (float)(1));
1294var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1296var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
1299var verify = Enumerable.Range(1, 10).Select(x => (int)(1));
1307var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1309var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
1312var verify = Enumerable.Range(1, 10).Select(x => (long)(1));
1320var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1322var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
1325var verify = Enumerable.Range(1, 10).Select(x => (int)(1));
1333var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1335var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
1338var verify = Enumerable.Range(1, 10).Select(x => (int)(1));
1346var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1348var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
1351var verify = Enumerable.Range(1, 10).Select(x => (uint)(1));
1359var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1361var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
1364var verify = Enumerable.Range(1, 10).Select(x => (ulong)(1));
1372var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1374var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
1377var verify = Enumerable.Range(1, 10).Select(x => (int)(1));
1385var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1389var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value));
1397var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1401var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x / (decimal)value));
1409var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1413var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x / (double)value));
1421var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1425var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x / (float)value));
1433var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1437var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value));
1445var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1449var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x / (long)value));
1457var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1461var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value));
1469var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1473var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value));
1481var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1485var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x / (uint)value));
1493var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1497var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x / (ulong)value));
1505var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1509var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value));
1517var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1521var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x));
1529var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1533var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value / (decimal)x));
1541var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1545var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value / (double)x));
1553var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1557var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value / (float)x));
1565var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1569var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x));
1577var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1581var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value / (long)x));
1589var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1593var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x));
1601var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1605var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x));
1613var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1617var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value / (uint)x));
1625var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1629var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value / (ulong)x));
1637var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1641var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x));
1649var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1651var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1654var verify = Enumerable.Range(1, 10).Select(x => (int)(0));
1662var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1664var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
1667var verify = Enumerable.Range(1, 10).Select(x => (decimal)(0));
1675var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1677var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
1680var verify = Enumerable.Range(1, 10).Select(x => (double)(0));
1688var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1690var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
1693var verify = Enumerable.Range(1, 10).Select(x => (float)(0));
1701var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1703var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
1706var verify = Enumerable.Range(1, 10).Select(x => (int)(0));
1714var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1716var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
1719var verify = Enumerable.Range(1, 10).Select(x => (long)(0));
1727var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1729var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
1732var verify = Enumerable.Range(1, 10).Select(x => (int)(0));
1740var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1742var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
1745var verify = Enumerable.Range(1, 10).Select(x => (int)(0));
1753var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1755var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
1758var verify = Enumerable.Range(1, 10).Select(x => (uint)(0));
1766var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1768var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
1771var verify = Enumerable.Range(1, 10).Select(x => (ulong)(0));
1779var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1781var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
1784var verify = Enumerable.Range(1, 10).Select(x => (int)(0));
1792var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1796var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value));
1804var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1808var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x % (decimal)value));
1816var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1820var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x % (double)value));
1828var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1832var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x % (float)value));
1840var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1844var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value));
1852var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1856var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x % (long)value));
1864var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1868var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value));
1876var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1880var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value));
1888var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1892var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x % (uint)value));
1900var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1904var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x % (ulong)value));
1912var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1916var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value));
1924var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1928var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x));
1936var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1940var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value % (decimal)x));
1948var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1952var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value % (double)x));
1960var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1964var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value % (float)x));
1972var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1976var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x));
1984var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
1988var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value % (long)x));
1996var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2000var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x));
2008var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2012var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x));
2020var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2024var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value % (uint)x));
2032var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2036var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value % (ulong)x));
2044var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2048var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x));
2056var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2058var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2061var verify = Enumerable.Range(1, 10).Select(x => true);
2071var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2073var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
2076var verify = Enumerable.Range(1, 10).Select(x => true);
2086var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2088var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
2091var verify = Enumerable.Range(1, 10).Select(x => true);
2101var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2103var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
2106var verify = Enumerable.Range(1, 10).Select(x => true);
2116var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2118var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
2121var verify = Enumerable.Range(1, 10).Select(x => true);
2131var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2133var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
2136var verify = Enumerable.Range(1, 10).Select(x => true);
2146var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2148var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
2151var verify = Enumerable.Range(1, 10).Select(x => true);
2161var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2163var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
2166var verify = Enumerable.Range(1, 10).Select(x => true);
2176var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2178var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
2181var verify = Enumerable.Range(1, 10).Select(x => true);
2191var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2193var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
2196var verify = Enumerable.Range(1, 10).Select(x => true);
2206var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2208var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
2211var verify = Enumerable.Range(1, 10).Select(x => true);
2221var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2225var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2233var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2237var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2245var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2249var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2257var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2261var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2269var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2273var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2281var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2285var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2293var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2297var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2305var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2309var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2317var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2321var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2329var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2333var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2341var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2345var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2353var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2355var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2358var verify = Enumerable.Range(1, 10).Select(x => true);
2368var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2370var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x);
2373var verify = Enumerable.Range(1, 10).Select(x => true);
2383var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2385var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x);
2388var verify = Enumerable.Range(1, 10).Select(x => true);
2398var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2400var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x);
2403var verify = Enumerable.Range(1, 10).Select(x => true);
2413var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2415var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x);
2418var verify = Enumerable.Range(1, 10).Select(x => true);
2428var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2430var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x);
2433var verify = Enumerable.Range(1, 10).Select(x => true);
2443var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2445var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x);
2448var verify = Enumerable.Range(1, 10).Select(x => true);
2458var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2460var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x);
2463var verify = Enumerable.Range(1, 10).Select(x => true);
2473var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2475var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x);
2478var verify = Enumerable.Range(1, 10).Select(x => true);
2488var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2490var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x);
2493var verify = Enumerable.Range(1, 10).Select(x => true);
2503var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2505var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x);
2508var verify = Enumerable.Range(1, 10).Select(x => true);
2518var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2522var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2530var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2534var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2542var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2546var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2554var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2558var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2566var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2570var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2578var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2582var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2590var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2594var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2602var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2606var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2614var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2618var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2626var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2630var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
2638var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x);
2642var verify = Enumerable.Range(1, 10).Select(x => (bool)(false));
DataFrameTests.BinaryOperations.cs (7)
158var dataFrameColumn1 = new DoubleDataFrameColumn("Double1", Enumerable.Range(0, 10).Select(x => (double)x));
168var dataFrameColumn1 = new BooleanDataFrameColumn("Bool1", Enumerable.Range(0, 10).Select(x => true));
169var dataFrameColumn2 = new BooleanDataFrameColumn("Bool2", Enumerable.Range(0, 10).Select(x => true));
200var dataFrameColumn1 = new DateTimeDataFrameColumn("DateTime1", Enumerable.Range(0, 5).Select(x => SampleDateTime.AddDays(x)));
202var dataFrameColumn2 = new DateTimeDataFrameColumn("DateTime2", Enumerable.Range(0, 4).Select(x => SampleDateTime.AddDays(x)));
298DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString()));
309DataFrameColumn stringColumnCopy = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString()));
DataFrameTests.cs (24)
61DataFrameColumn intColumn = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, rowCount).Select(x => x));
62DataFrameColumn floatColumn = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x));
75DataFrameColumn bigColumn = new SingleDataFrameColumn("BigColumn", Enumerable.Range(0, rowCount + 1).Select(x => (float)x));
80DataFrameColumn smallColumn = new SingleDataFrameColumn("SmallColumn", Enumerable.Range(0, rowCount - 1).Select(x => (float)x));
85DataFrameColumn repeatedName = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x));
89DataFrameColumn extraColumn = new SingleDataFrameColumn("OtherFloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x));
94DataFrameColumn intColumnCopy = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, rowCount).Select(x => x));
97DataFrameColumn differentIntColumn = new Int32DataFrameColumn("IntColumn1", Enumerable.Range(0, rowCount).Select(x => x));
116DataFrameColumn intColumn = new Int32DataFrameColumn("NewIntColumn", Enumerable.Range(0, 10).Select(x => x));
150DataFrameColumn intColumn = new Int32DataFrameColumn("NewIntColumn", Enumerable.Range(0, 10).Select(x => x));
804Assert.Throws<ArgumentException>(() => df.Columns.Insert(1, new Int32DataFrameColumn("Int2", Enumerable.Range(0, 5).Select(x => x))));
1202StringDataFrameColumn column = new StringDataFrameColumn("Strings", Enumerable.Range(0, 11).Select(x => x.ToString()));
1248DataFrameColumn stringColumn = DataFrameColumn.Create("String", Enumerable.Range(0, length).Select(x => x.ToString()));
1250DataFrameColumn byteColumn = DataFrameColumn.Create("Byte", Enumerable.Range(0, length).Select(x => (byte)x));
1252DataFrameColumn decimalColumn = DataFrameColumn.Create("Decimal", Enumerable.Range(0, length).Select(x => (decimal)x));
1254DataFrameColumn doubleColumn = DataFrameColumn.Create("Double", Enumerable.Range(0, length).Select(x => (double)x));
1256DataFrameColumn floatColumn = DataFrameColumn.Create("Float", Enumerable.Range(0, length).Select(x => (float)x));
1258DataFrameColumn intColumn = DataFrameColumn.Create("Int", Enumerable.Range(0, length).Select(x => x));
1260DataFrameColumn longColumn = DataFrameColumn.Create("Long", Enumerable.Range(0, length).Select(x => (long)x));
1262DataFrameColumn sbyteColumn = DataFrameColumn.Create("Sbyte", Enumerable.Range(0, length).Select(x => (sbyte)x));
1264DataFrameColumn shortColumn = DataFrameColumn.Create("Short", Enumerable.Range(0, length).Select(x => (short)x));
1266DataFrameColumn uintColumn = DataFrameColumn.Create("Uint", Enumerable.Range(0, length).Select(x => (uint)x));
1268DataFrameColumn ulongColumn = DataFrameColumn.Create("Ulong", Enumerable.Range(0, length).Select(x => (ulong)x));
1270DataFrameColumn ushortColumn = DataFrameColumn.Create("Ushort", Enumerable.Range(0, length).Select(x => (ushort)x));
DataFrameTests.Utils.cs (20)
19DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1", Enumerable.Range(0, length).Select(x => x));
20DataFrameColumn dataFrameColumn2 = new Int32DataFrameColumn("Int2", Enumerable.Range(10, length).Select(x => x));
105DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0));
117DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0));
129DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, length).Select(x => x.ToString()));
136DataFrameColumn charColumn = new CharDataFrameColumn("Char", Enumerable.Range(0, length).Select(x => (char)(x + 65)));
150DataFrameColumn dateTimeColumn = new DateTimeDataFrameColumn("DateTime", Enumerable.Range(0, length).Select(x => SampleDateTime.AddDays(x)));
163var byteColumn = new ByteDataFrameColumn("Byte", range.Select(x => (byte)x));
164var decimalColumn = new DecimalDataFrameColumn("Decimal", range.Select(x => (decimal)x));
165var doubleColumn = new DoubleDataFrameColumn("Double", range.Select(x => (double)x));
166var floatColumn = new SingleDataFrameColumn("Float", range.Select(x => (float)x));
167var intColumn = new Int32DataFrameColumn("Int", range.Select(x => x));
168var longColumn = new Int64DataFrameColumn("Long", range.Select(x => (long)x));
169var sbyteColumn = new SByteDataFrameColumn("Sbyte", range.Select(x => (sbyte)x));
170var shortColumn = new Int16DataFrameColumn("Short", range.Select(x => (short)x));
171var uintColumn = new UInt32DataFrameColumn("Uint", range.Select(x => (uint)x));
172var ulongColumn = new UInt64DataFrameColumn("Ulong", range.Select(x => (ulong)x));
173var ushortColumn = new UInt16DataFrameColumn("Ushort", range.Select(x => (ushort)x));
207DataFrameColumn baseColumn1 = DataFrameColumn.Create("Column1", Enumerable.Range(0, length).Select(x => (T1)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T1))));
208DataFrameColumn baseColumn2 = DataFrameColumn.Create("Column2", Enumerable.Range(0, length).Select(x => (T2)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T2))));
Microsoft.DotNet.Arcade.Sdk (10)
src\SourceBuild\ReadSourceBuildIntermediateNupkgDependencies.cs (1)
55.Select(d =>
Microsoft.DotNet.Arcade.Sdk.Tests (6)
Microsoft.DotNet.AsmDiff (9)
Microsoft.DotNet.Build.Tasks.Feed (20)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Build.Tasks.Installers (9)
Microsoft.DotNet.Build.Tasks.Packaging (109)
ValidatePackage.cs (17)
144.Select(r => r.TargetFramework)
146.Select(fx => fx.Version);
151.Select(vf => vf.Framework.Version);
186var compileAssetPaths = compileTarget.CompileAssets.Select(ca => ca.PackagePath);
202var runtimeAssetPaths = runtimeTarget.RuntimeAssets.Select(ra => ra.PackagePath);
352Log.LogError($"When targeting {target} {ContractName} will use {implementationAssembly.LocalPath} which targets {implementationAssembly.TargetFramework.GetShortFolderName()} but {String.Join(";", matchingFxAssets.Select(i => i.PackagePath))} targets {fx.GetShortFolderName()} specifically.");
363AllSupportedFrameworks = _frameworks.Values.Where(fx => fx.SupportedVersion != null).Select(fx => fx.ToItem()).OrderBy(i => i.ItemSpec).ToArray();
378var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath")));
383Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} is missing an entry for package {PackageId}. Please run /t:UpdatePackageIndex on this project to commit an update.");
389var assemblyVersions = new HashSet<Version>(allAssemblies.Select(f => VersionUtility.As4PartVersion(f.Version)));
400Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} is missing an assembly version entry for {fileVersion} for package {PackageId}. Please run /t:UpdatePackageIndex on this project to commit an update.");
407Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} indicates that assembly version {fileVersion} is contained in non-stable package version {packageVersion} which differs from this package version {thisPackageVersion}.");
414.Select(pair => pair.Key);
417Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} is has an assembly version entry(s) for {String.Join(", ", orphanedAssemblyVersions)} which are no longer in package {PackageId}. Please run /t:UpdatePackageIndex on this project to commit an update.");
430Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} is missing an baseline entry(s) for native module {PackageId}. Please run /t:UpdatePackageIndex on this project to commit an update.");
437var moduleNames = allDlls.Select(d => Path.GetFileNameWithoutExtension(d.LocalPath));
441Log.LogError($"PackageIndex from {String.Join(", ", PackageIndexes.Select(i => i.ItemSpec))} is missing ModulesToPackages entry(s) for {String.Join(", ", missingModuleNames)} to package {PackageId}. Please add a an entry for the appropriate package.");
Microsoft.DotNet.Build.Tasks.Packaging.Tests (1)
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (5)
Microsoft.DotNet.Build.Tasks.Workloads (4)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (1)
Microsoft.DotNet.Deployment.Tasks.Links (5)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.GenFacades (6)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.Sdk (10)
Microsoft.DotNet.Internal.DependencyInjection.Testing (1)
Microsoft.DotNet.MacOsPkg.Tests (1)
Microsoft.DotNet.NuGetRepack.Tests (10)
Microsoft.DotNet.PackageTesting (3)
Microsoft.DotNet.RemoteExecutor (4)
Microsoft.DotNet.SharedFramework.Sdk (9)
Microsoft.DotNet.SignCheck (2)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SignTool (6)
Microsoft.DotNet.SignTool.Tests (3)
Microsoft.DotNet.SourceBuild.Tasks (35)
Microsoft.DotNet.SourceBuild.Tasks.Tests (3)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (9)
Microsoft.DotNet.VersionTools (53)
Microsoft.DotNet.VersionTools.Tasks (6)
Microsoft.DotNet.XliffTasks (2)
Microsoft.DotNet.XUnitExtensions (3)
Microsoft.Extensions.Compliance.Testing.Tests (2)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.Binder (1)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.DependencyModel (6)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.FileProviders.Embedded.Tests (3)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.FileSystemGlobbing (2)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
Microsoft.Extensions.Http.Resilience.Tests (3)
Microsoft.Extensions.Identity.Core (4)
Microsoft.Extensions.Options.Contextual.Tests (1)
Microsoft.Extensions.Options.SourceGeneration (3)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.Telemetry (1)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.Gen.ContextualOptions (11)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging (9)
Microsoft.Gen.Metrics.Generated.Tests (30)
MetricTests.cs (22)
71Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
154Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
174var tags = measurements[0].Tags.Select(x => (x.Key, x.Value));
177tags = measurements[1].Tags.Select(x => (x.Key, x.Value));
198var tags = measurements[0].Tags.Select(x => (x.Key, x.Value));
201tags = measurements[1].Tags.Select(x => (x.Key, x.Value));
253Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
259Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
266Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
278Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
284Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
291Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
329Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
342Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
372measurement.Tags.Select(x => (x.Key, x.Value)));
421measurement.Tags.Select(x => (x.Key, x.Value)));
444measurement.Tags.Select(x => (x.Key, x.Value)));
467measurement.Tags.Select(x => (x.Key, x.Value)));
515measurement.Tags.Select(x => (x.Key, x.Value)));
564measurement.Tags.Select(x => (x.Key, x.Value)));
587measurement.Tags.Select(x => (x.Key, x.Value)));
609measurement.Tags.Select(x => (x.Key, x.Value)));
MetricTests.Ext.cs (8)
55Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
135Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
184measurement.Tags.Select(x => (x.Key, x.Value)));
206measurement.Tags.Select(x => (x.Key, x.Value)));
228measurement.Tags.Select(x => (x.Key, x.Value)));
277measurement.Tags.Select(x => (x.Key, x.Value)));
299measurement.Tags.Select(x => (x.Key, x.Value)));
321measurement.Tags.Select(x => (x.Key, x.Value)));
Microsoft.Gen.MetricsReports (2)
Microsoft.Interop.ComInterfaceGenerator (15)
Microsoft.Interop.JavaScript.JSImportGenerator (4)
Microsoft.Interop.LibraryImportGenerator (3)
Microsoft.Interop.SourceGeneration (5)
Microsoft.JSInterop.Tests (1)
Microsoft.ML.AutoML (131)
Experiment\Runners\CrossValSummaryRunner.cs (29)
76var bestFoldIndex = BestResultUtil.GetIndexOfBestScore(trainResults.Select(r => r.score), _optimizingMetricInfo.IsMaximizing);
83var avgScore = GetAverageOfNonNaNScores(trainResults.Select(x => x.score));
84var indexClosestToAvg = GetIndexClosestToAverage(trainResults.Select(r => r.score), avgScore);
86var avgMetrics = GetAverageMetrics(trainResults.Select(x => x.metrics), metricsClosestToAvg);
98var newMetrics = metrics.Select(x => x as BinaryClassificationMetrics);
102auc: GetAverageOfNonNaNScores(newMetrics.Select(x => x.AreaUnderRocCurve)),
103accuracy: GetAverageOfNonNaNScores(newMetrics.Select(x => x.Accuracy)),
104positivePrecision: GetAverageOfNonNaNScores(newMetrics.Select(x => x.PositivePrecision)),
105positiveRecall: GetAverageOfNonNaNScores(newMetrics.Select(x => x.PositiveRecall)),
106negativePrecision: GetAverageOfNonNaNScores(newMetrics.Select(x => x.NegativePrecision)),
107negativeRecall: GetAverageOfNonNaNScores(newMetrics.Select(x => x.NegativeRecall)),
108f1Score: GetAverageOfNonNaNScores(newMetrics.Select(x => x.F1Score)),
109auprc: GetAverageOfNonNaNScores(newMetrics.Select(x => x.AreaUnderPrecisionRecallCurve)),
117var newMetrics = metrics.Select(x => x as MulticlassClassificationMetrics);
121accuracyMicro: GetAverageOfNonNaNScores(newMetrics.Select(x => x.MicroAccuracy)),
122accuracyMacro: GetAverageOfNonNaNScores(newMetrics.Select(x => x.MacroAccuracy)),
123logLoss: GetAverageOfNonNaNScores(newMetrics.Select(x => x.LogLoss)),
124logLossReduction: GetAverageOfNonNaNScores(newMetrics.Select(x => x.LogLossReduction)),
126topKAccuracies: GetAverageOfNonNaNScoresInNestedEnumerable(newMetrics.Select(x => x.TopKAccuracyForAllK)),
134var newMetrics = metrics.Select(x => x as RegressionMetrics);
138l1: GetAverageOfNonNaNScores(newMetrics.Select(x => x.MeanAbsoluteError)),
139l2: GetAverageOfNonNaNScores(newMetrics.Select(x => x.MeanSquaredError)),
140rms: GetAverageOfNonNaNScores(newMetrics.Select(x => x.RootMeanSquaredError)),
141lossFunction: GetAverageOfNonNaNScores(newMetrics.Select(x => x.LossFunction)),
142rSquared: GetAverageOfNonNaNScores(newMetrics.Select(x => x.RSquared)));
148var newMetrics = metrics.Select(x => x as RankingMetrics);
152dcg: GetAverageOfNonNaNScoresInNestedEnumerable(newMetrics.Select(x => x.DiscountedCumulativeGains)),
153ndcg: GetAverageOfNonNaNScoresInNestedEnumerable(newMetrics.Select(x => x.NormalizedDiscountedCumulativeGains)));
178arr[i] = GetAverageOfNonNaNScores(results.Select(x => x.ElementAt(i)));
Microsoft.ML.AutoML.Interactive (2)
Microsoft.ML.AutoML.Samples (3)
Microsoft.ML.AutoML.SourceGenerator (14)
Microsoft.ML.AutoML.Tests (14)
Microsoft.ML.Benchmarks.Tests (2)
Microsoft.ML.CodeGenerator (8)
Microsoft.ML.Core (19)
Utilities\MatrixTransposeOps.cs (9)
91IEnumerable<int> jenum = Enumerable.Range(0, jsteps).Select(j => j * _block);
92IEnumerable<int> ienum = Enumerable.Range(0, isteps).Select(i => i * _block);
93IEnumerable<Tuple<int, int>> ijenum = ienum.SelectMany(i => jenum.Select(j => new Tuple<int, int>(i, j)));
143IEnumerable<int> jenum = Enumerable.Range(0, jsteps).Select(j => j * _block);
144IEnumerable<int> ienum = Enumerable.Range(0, isteps).Select(i => i * _block);
145IEnumerable<Tuple<int, int>> ijenum = ienum.SelectMany(i => jenum.Select(j => new Tuple<int, int>(i, j)));
196IEnumerable<int> jenum = Enumerable.Range(0, jsteps).Select(j => j * _block);
197IEnumerable<int> ienum = Enumerable.Range(0, isteps).Select(i => i * _block);
198IEnumerable<Tuple<int, int>> ijenum = ienum.SelectMany(i => jenum.Select(j => new Tuple<int, int>(i, j)));
Microsoft.ML.Core.Tests (26)
Microsoft.ML.Data (139)
Evaluators\EvaluatorUtils.cs (10)
494var reconciledSlotNames = new VBuffer<ReadOnlyMemory<char>>(slotNames.Count, slotNames.Keys.Select(k => k.AsMemory()).ToArray());
613var keyValueMappers = Utils.MarshalInvoke(MapKeys<int>, keyValueType.RawType, views.Select(view => view.Schema).ToArray(), columnName, false, indices, keyNames);
681var keyValueMappers = Utils.MarshalInvoke(MapKeys<int>, keyValueType.RawType, views.Select(view => view.Schema).ToArray(), columnName, true, columnIndices, keyNames);
942return AppendRowsDataView.Create(env, null, views.Select(keyToValue).Select(selectDropNonVarLenthCol).ToArray());
1705sb.Append(GetOverallMetricsAsString(weightedAgg.Select(x => x.Sum).ToArray(), weightedAgg.Select(x => x.SumSq).ToArray(), numFolds, true, true, weightedAgg.Select(x => x.Name).ToList()));
1706sb.Append(GetOverallMetricsAsString(agg.Select(x => x.Sum).ToArray(), agg.Select(x => x.SumSq).ToArray(), numFolds, false, true, agg.Select(x => x.Name).ToList()));
Transforms\ColumnConcatenatingTransformer.cs (12)
89taggedColumn.Source = res.Source.Select(s => new KeyValuePair<string, string>(null, s)).ToArray();
100column.Source = Source.Select(kvp => kvp.Value).ToArray();
151return inputColumnNames.Select(name => (name, (string)null));
224=> _columns.Select(col => (outputColumnName: col.Name, inputColumnNames: col.Sources.Select(source => source.name).ToArray())).ToArray().AsReadOnly();
380.Select(c => new ColumnOptions(c.Name, c.Source))
400.Select(c => new ColumnOptions(c.Name, c.Source.Select(kvp => (kvp.Value, kvp.Key != "" ? kvp.Key : null))))
553_srcTypes = sources.Select(c => inputSchema[c].Type).ToArray();
871protected override DataViewSchema.DetachedColumn[] GetOutputColumnsCore() => _columns.Select(x => x.MakeSchemaColumn()).ToArray();
940var node = ctx.CreateNode(opType, inputList.Select(t => t.Key),
942node.AddAttribute("inputdimensions", inputList.Select(x => x.Value));
Transforms\ConversionsExtensionsCatalog.cs (14)
106var columnOptions = columns.Select(x => new TypeConvertingEstimator.ColumnOptions(x.OutputColumnName, outputKind, x.InputColumnName)).ToArray();
163return new KeyToValueMappingEstimator(env, columns.Select(x => (x.OutputColumnName, x.InputColumnName)).ToArray());
217var columnOptions = columns.Select(x => new KeyToVectorMappingEstimator.ColumnOptions(x.OutputColumnName, x.InputColumnName, outputCountVector)).ToArray();
291var columnOptions = columns.Select(x => new ValueToKeyMappingEstimator.ColumnOptions(x.OutputColumnName, x.InputColumnName, maximumNumberOfKeys, keyOrdinality, addKeyValueAnnotationsAsText)).ToArray();
339var keys = keyValuePairs.Select(pair => pair.Key);
340var values = keyValuePairs.Select(pair => pair.Value);
371var keys = keyValuePairs.Select(pair => pair.Key);
372var values = keyValuePairs.Select(pair => pair.Value);
405var keys = keyValuePairs.Select(pair => pair.Key);
406var values = keyValuePairs.Select(pair => pair.Value);
443var keys = keyValuePairs.Select(pair => pair.Key);
444var values = keyValuePairs.Select(pair => pair.Value);
475var keys = keyValuePairs.Select(pair => pair.Key);
476var values = keyValuePairs.Select(pair => pair.Value);
Transforms\ValueMapping.cs (13)
229builder.AddColumn(columnName, values.Select(x => x.ToString()).ToArray());
244var converted = value.Select(x => x.ToString().AsMemory());
306uint[] indices = values.Select((x) => Convert.ToUInt32(x)).ToArray();
311ulong[] indices = values.Select((x) => Convert.ToUInt64(x)).ToArray();
688(string outputColumnName, string inputColumnName)[] columns = options.Columns.Select(x => (x.Name, x.Source)).ToArray();
1004view = ColumnSelectingTransformer.CreateKeep(host, view, cols.Select(x => x.outputColumnName).ToArray());
1220node.AddAttribute("values_int64s", _valueMap.GetValues<int>().Select(item => Convert.ToInt64(item)));
1226node.AddAttribute("values_int64s", _valueMap.GetValues<short>().Select(item => Convert.ToInt64(item)));
1232node.AddAttribute("values_int64s", _valueMap.GetValues<ulong>().Select(item => Convert.ToInt64(item)));
1238node.AddAttribute("values_int64s", _valueMap.GetValues<uint>().Select(item => Convert.ToInt64(item)));
1244node.AddAttribute("values_int64s", _valueMap.GetValues<ushort>().Select(item => Convert.ToInt64(item)));
1254node.AddAttribute("values_floats", _valueMap.GetValues<double>().Select(item => Convert.ToSingle(item)));
1264node.AddAttribute("values_floats", _valueMap.GetValues<bool>().Select(item => Convert.ToSingle(item)));
Microsoft.ML.DataView (4)
Microsoft.ML.Ensemble (7)
Microsoft.ML.EntryPoints (3)
Microsoft.ML.Fairlearn (22)
Metrics\FairlearnMetricCatalog.cs (17)
94.ToDictionary(group => group.Key, group => _context.Data.LoadFromEnumerable(group.Select(g => g.Item2)));
96var groupMetric = res.Select(kv => (kv.Key, _context.BinaryClassification.EvaluateNonCalibrated(kv.Value)))
100result[_sensitiveFeatureColumn] = DataFrameColumn.Create(_sensitiveFeatureColumn, groupMetric.Keys.Select(x => x.ToString()));
101result["AUC"] = DataFrameColumn.Create("AUC", groupMetric.Keys.Select(k => groupMetric[k].AreaUnderRocCurve)); //coloumn name?
102result["Accuracy"] = DataFrameColumn.Create("Accuracy", groupMetric.Keys.Select(k => groupMetric[k].Accuracy));
103result["PosPrec"] = DataFrameColumn.Create("PosPrec", groupMetric.Keys.Select(k => groupMetric[k].PositivePrecision));
104result["PosRecall"] = DataFrameColumn.Create("PosRecall", groupMetric.Keys.Select(k => groupMetric[k].PositiveRecall));
105result["NegPrec"] = DataFrameColumn.Create("NegPrec", groupMetric.Keys.Select(k => groupMetric[k].NegativePrecision));
106result["NegRecall"] = DataFrameColumn.Create("NegRecall", groupMetric.Keys.Select(k => groupMetric[k].NegativeRecall));
107result["F1Score"] = DataFrameColumn.Create("F1Score", groupMetric.Keys.Select(k => groupMetric[k].F1Score));
108result["AreaUnderPrecisionRecallCurve"] = DataFrameColumn.Create("AreaUnderPrecisionRecallCurve", groupMetric.Keys.Select(k => groupMetric[k].AreaUnderPrecisionRecallCurve));
190var data = new DataFrame(_eval.Schema.AsEnumerable().Select<DataViewSchema.Column, DataFrameColumn>(column =>
234result[_sensitiveFeatureColumn] = DataFrameColumn.Create(_sensitiveFeatureColumn, groupMetric.Keys.Select(x => x.ToString()));
235result["RSquared"] = DataFrameColumn.Create("RSquared", groupMetric.Keys.Select(k => groupMetric[k].RSquared));
236result["RMS"] = DataFrameColumn.Create("RMS", groupMetric.Keys.Select(k => groupMetric[k].RootMeanSquaredError));
237result["MSE"] = DataFrameColumn.Create("MSE", groupMetric.Keys.Select(k => groupMetric[k].MeanSquaredError));
238result["MAE"] = DataFrameColumn.Create("MAE", groupMetric.Keys.Select(k => groupMetric[k].MeanAbsoluteError));
Microsoft.ML.FastTree (76)
Microsoft.ML.GenAI.LLaMA (1)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Mistral (5)
Microsoft.ML.GenAI.Mistral.Tests (1)
Microsoft.ML.GenAI.Phi (4)
Microsoft.ML.GenAI.Phi.Tests (2)
Microsoft.ML.ImageAnalytics (5)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (6)
Microsoft.ML.Mkl.Components (2)
Microsoft.ML.OnnxConverter (8)
Microsoft.ML.OnnxTransformer (11)
Microsoft.ML.Parquet (3)
Microsoft.ML.PCA (2)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.ResultProcessor (1)
Microsoft.ML.Samples (110)
Microsoft.ML.Samples.GPU (2)
Microsoft.ML.SearchSpace (8)
Microsoft.ML.SearchSpace.Tests (18)
UniformNumericOptionTests.cs (18)
25var sampleInputs = Enumerable.Range(0, 10).Select(i => i * 0.1);
26var sampleOutputs = sampleInputs.Select(i => option.SampleFromFeatureSpace(new[] { i }));
28sampleOutputs.Select(x => x.AsType<int>()).Should().Equal(0, 10, 20, 30, 40, 50, 60, 70, 80, 90);
36var sampleInputs = Enumerable.Range(0, 10).Select(i => i * 0.1);
37var sampleOutputs = sampleInputs.Select(i => option.SampleFromFeatureSpace(new[] { i }));
39sampleOutputs.Select(x => x.AsType<int>()).Should().Equal(1, 2, 4, 8, 16, 32, 64, 128, 256, 512);
47var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromInt(i * 10));
48var sampleOutputs = sampleInputs.Select(i => option.MappingToFeatureSpace(i)[0]);
65var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromInt(Convert.ToInt32(Math.Pow(2, i))));
66var sampleOutputs = sampleInputs.Select(i => option.MappingToFeatureSpace(i)[0]).ToArray();
79var sampleInputs = Enumerable.Range(0, 10).Select(i => i * 0.1);
80var sampleOutputs = sampleInputs.Select(i => option.SampleFromFeatureSpace(new[] { i }));
92var sampleInputs = Enumerable.Range(0, 10).Select(i => i * 0.1);
93var sampleOutputs = sampleInputs.Select(i => option.SampleFromFeatureSpace(new[] { i }));
105var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromDouble(i * 10.0));
106var sampleOutputs = sampleInputs.Select(i => option.MappingToFeatureSpace(i)[0]);
116var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromDouble(Math.Pow(2, i)));
117var sampleOutputs = sampleInputs.Select(i => option.MappingToFeatureSpace(i)).ToArray();
Microsoft.ML.StandardTrainers (6)
Microsoft.ML.Sweeper (13)
Microsoft.ML.Sweeper.Tests (1)
Microsoft.ML.TensorFlow (6)
Microsoft.ML.Tests (103)
Transformers\CategoricalHashTests.cs (22)
143Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
146Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" });
149Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
152Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
156Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
159Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "1:2", "0:5", "1:4", "1:6", "0:3", "0:1" });
162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "-1", "1" });
169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
172System.Diagnostics.Trace.WriteLine(slots.Items().Select(x => x.Value.ToString()).Distinct());
173var temp = slots.Items().Select(x => x.Value.ToString()).Distinct();
174Assert.Equal(slots.Items().Select(x => x.Value.ToString()).Distinct(), new string[14] { "[0].", "[0].0:A", "[0].0:E", "[0].0:D", "[0].1:A", "[0].1:E", "[0].1:D", "[1].", "[1].0:A", "[1].0:E", "[1].0:D", "[1].1:A", "[1].1:E", "[1].1:D" });
177Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "65535", "65536", "131071" });
181Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
184Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "E", "D" });
187Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "65535" });
191Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
194Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" });
197Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
200Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
203Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
208Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
Transformers\CategoricalTests.cs (26)
221Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
224Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
227Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
230Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
234Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
237Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "3", "5" });
240Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
243Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" });
247Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
250Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[12] { "[0].1", "[0].2", "[0].3", "[0].4", "[0].5", "[0].6", "[1].1", "[1].2", "[1].3", "[1].4", "[1].5", "[1].6" });
253Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "5", "6", "11" });
257Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
260Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "-1" });
263Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "1" });
267Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
270Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" });
273Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
276Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" });
279Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
282Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
285Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
288Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
292Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
295Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
298Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
301Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "Bit2", "Bit1", "Bit0" });
Transformers\KeyToBinaryVectorEstimatorTest.cs (4)
117Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
120Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
123Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
126Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
Transformers\KeyToVectorEstimatorTests.cs (18)
136Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
139Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
142Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
145Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
148Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 0 });
152Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
155Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[4] { "[0].3", "[0].5", "[1].3", "[1].5" });
158Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 1, 2, 3 });
162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" });
169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
172Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 5, 6, 11 });
176Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.IsNormalized });
180Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
183Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" });
186Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
189Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" });
192Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 1 });
Microsoft.ML.TimeSeries (11)
Microsoft.ML.TimeSeries.Tests (1)
Microsoft.ML.Tokenizers (3)
Microsoft.ML.Tokenizers.Tests (145)
BpeTests.cs (9)
258int[] encodingIds = encoding.Select(t => t.Id).ToArray();
380Assert.Equal(encoding.Select(t => t.Id).ToArray(), ids);
432Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
433Assert.Equal(expectedOffsets, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
434Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
436Assert.Equal(expectedTokens, encoding1.Select(t => t.Value).ToArray());
437Assert.Equal(expectedOffsets, encoding1.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
438Assert.Equal(expectedIds, encoding1.Select(t => t.Id).ToArray());
528Assert.Equal(expectedTokens.Select(t => t.Id).ToArray(), ids);
CodeGenTests.cs (78)
236Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
237Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
238Assert.Equal(expectedOffsetsWithSpace, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
242Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
243Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
244Assert.Equal(expectedOffsets, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
253int[] ids = encoding.Select(t => t.Id).ToArray();
256ids = encoding.Select(t => t.Id).ToArray();
261ids = encoding.Select(t => t.Id).ToArray();
264ids = encoding.Select(t => t.Id).ToArray();
269ids = encoding.Select(t => t.Id).ToArray();
272ids = encoding.Select(t => t.Id).ToArray();
277ids = encoding.Select(t => t.Id).ToArray();
280ids = encoding.Select(t => t.Id).ToArray();
285ids = encoding.Select(t => t.Id).ToArray();
288ids = encoding.Select(t => t.Id).ToArray();
293ids = encoding.Select(t => t.Id).ToArray();
297ids = encoding.Select(t => t.Id).ToArray();
556Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
557Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
561Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
562Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
566Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
567Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
571Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
572Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
580Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
581Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
585Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
586Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
590Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
591Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
595Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
596Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
600Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
601Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
605Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
606Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
689Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
690Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
694Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
695Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
699Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
700Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
704Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
705Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
713Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
714Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
718Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
719Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
723Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
724Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
728Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
729Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
733Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
734Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
738Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
739Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
824Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
825Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
830Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
831Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
836Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
837Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
842Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
843Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
854Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
855Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
860Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
861Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
866Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
867Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
872Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
873Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
878Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
879Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
884Assert.Equal(expectedIdsWithSpace, encoding.Select(t => t.Id).ToArray());
885Assert.Equal(expectedTokensWithSpace, encoding.Select(t => t.Value).ToArray());
EnglishRobertaTests.cs (9)
184Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
185Assert.Equal(expectedOffsets, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
186Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
188Assert.Equal(expectedTokens, encoding1.Select(t => t.Value).ToArray());
189Assert.Equal(expectedOffsets, encoding1.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
190Assert.Equal(expectedIds, encoding1.Select(t => t.Id).ToArray());
266int[] encodingIds = encoding.Select(t => t.Id).ToArray();
267(int, int)[] offsets = encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray();
268string[] tokens = encoding.Select(t => t.Value).ToArray();
LlamaTests.cs (24)
245Assert.Equal(ids, result.Select(t => t.Id).ToArray());
246Assert.Equal(tokens, result.Select(t => t.Value).ToArray());
247Assert.Equal(offsets, result.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
267Assert.Equal(ids.Skip(1), bpeTokens.Select(token => token.Id));
268Assert.Equal(tokens.Skip(1), bpeTokens.Select(token => token.Value));
269int[] extractedIds = bpeTokens.Select(token => token.Id).ToArray();
277Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id));
278Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Skip(1).Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value));
279extractedIds = bpeTokens.Select(token => token.Id).ToArray();
287Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id));
288Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value));
289extractedIds = bpeTokens.Select(token => token.Id).ToArray();
503Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
504Assert.Equal(expectedOffsets, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
505Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
507Assert.Equal(expectedTokens, encoding1.Select(t => t.Value).ToArray());
508Assert.Equal(expectedOffsets, encoding1.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
509Assert.Equal(expectedIds, encoding1.Select(t => t.Id).ToArray());
541Assert.Equal(expectedTokens1, encoding.Select(t => t.Value).ToArray());
542Assert.Equal(expectedOffsets1, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
543Assert.Equal(expectedIds1, encoding.Select(t => t.Id).ToArray());
665Assert.Equal(new[] { tokenizer.BeginningOfSentenceToken, kvp.Key }, encodedTokens.Select(et => et.Value).ToArray());
666Assert.Equal(new[] { tokenizer.BeginningOfSentenceId, kvp.Value }, encodedTokens.Select(et => et.Id).ToArray());
670Assert.Equal(encodedIds, encodedTokens.Select(et => et.Id).ToArray());
TiktokenTests.cs (24)
146int[] ids = result.Select(token => token.Id).ToArray();
147string[] tokens = result.Select(token => token.Value).ToArray();
148Range[] offsets = result.Select(token => token.Offset).ToArray();
199int[] ids = result.Select(token => token.Id).ToArray();
200string[] tokens = result.Select(token => token.Value).ToArray();
201(int, int)[] offsets = result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray();
240int[] ids = result.Select(token => token.Id).ToArray();
241string[] tokens = result.Select(token => token.Value).ToArray();
242(int, int)[] offsets = result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray();
275Assert.Equal(encoded, result.Select(token => token.Id).ToArray());
277Assert.Equal(new string[] { "<|im_start|>", "Hello", " ⭐", "⭐", " World", "<|im_end|>" }, result.Select(token => token.Value).ToArray());
278Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 2), (18, 1), (19, 6), (25, 10) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
310Assert.Equal(encoded, result.Select(token => token.Id).ToArray());
312Assert.Equal(new string[] { "<|endoftext|>", "Hello", " ⭐", " World", "<|endofprompt|>" }, result.Select(token => token.Value).ToArray());
313Assert.Equal(new List<(int, int)> { (0, 13), (13, 5), (18, 2), (20, 6), (26, 15) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
571Assert.Equal(expectedTokens, encoding.Select(t => t.Value).ToArray());
572Assert.Equal(expectedOffsets, encoding.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
573Assert.Equal(expectedIds, encoding.Select(t => t.Id).ToArray());
575Assert.Equal(expectedTokens, encoding1.Select(t => t.Value).ToArray());
576Assert.Equal(expectedOffsets, encoding1.Select(t => (t.Offset.Start.Value, t.Offset.End.Value - t.Offset.Start.Value)).ToArray());
577Assert.Equal(expectedIds, encoding1.Select(t => t.Id).ToArray());
684int[] ids = result.Select(r => r.Id).ToArray();
685(int Index, int Length)[] offsets = result.Select(r => (r.Offset.Start.Value, r.Offset.End.Value - r.Offset.Start.Value)).ToArray();
686Assert.Equal(expectedTokens, result.Select(r => r.Value));
Microsoft.ML.TorchSharp (15)
Microsoft.ML.TorchSharp.Tests (2)
Microsoft.ML.Transforms (60)
Microsoft.ML.Vision (8)
Microsoft.Net.Http.Headers (2)
Microsoft.NET.StringTools (1)
Microsoft.NET.StringTools.net35 (1)
Microsoft.TestUtilities (1)
Microsoft.VisualBasic.Tests (6)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (6)
105var tasks = Enumerable.Range(0, n).Select(i => Task.Factory.StartNew(() =>
133string[][] sentArgs = Enumerable.Range(0, n).Select(i => Enumerable.Range(0, i).Select(i => i.ToString()).ToArray()).ToArray();
154string[][] sentArgs = Enumerable.Range(0, n).Select(i => Enumerable.Range(0, i).Select(i => i.ToString()).ToArray()).ToArray();
157var tasks = Enumerable.Range(0, n).Select(i => Task.Factory.StartNew(() => { Assert.True(SendSecondInstanceArgs(pipeName, SendTimeout, sentArgs[i])); }, cancellationToken: default, creationOptions: default, scheduler: TaskScheduler.Default)).ToArray();
Microsoft.VisualStudio.LanguageServices (35)
Preview\ReferenceChange.cs (6)
38.Select(r => new MetadataReferenceChange(r, projectId, projectName, isAdded: true, engine: engine));
43.Select(r => new MetadataReferenceChange(r, projectId, projectName, isAdded: false, engine: engine));
49.Select(r => new ProjectReferenceChange(r, newSolution.GetProject(r.ProjectId).Name, projectId, projectName, isAdded: true, engine: engine));
54.Select(r => new ProjectReferenceChange(r, oldSolution.GetProject(r.ProjectId).Name, projectId, projectName, isAdded: false, engine: engine));
60.Select(r => new AnalyzerReferenceChange(r, projectId, projectName, isAdded: true, engine: engine));
65.Select(r => new AnalyzerReferenceChange(r, projectId, projectName, isAdded: false, engine: engine));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
MSBuild (2)
MSBuildTaskHost (1)
Mvc.RoutingWebSite (2)
OpenIdConnectSample (3)
Startup.cs (3)
283await WriteTableHeader(res, new string[] { "Token Type", "Value" }, props.GetTokens().Select(token => new string[] { token.Name, token.Value }));
319await WriteTableHeader(res, new string[] { "Claim Type", "Value" }, context.User.Claims.Select(c => new string[] { c.Type, c.Value }));
322await WriteTableHeader(res, new string[] { "Token Type", "Value" }, props.GetTokens().Select(token => new string[] { token.Name, token.Value }));
PresentationBuildTasks (2)
PresentationFramework (2)
ProjectCachePlugin (1)
Qdrant.ApiService (1)
Roslyn.Test.PdbUtilities (3)
Roslyn.VisualStudio.DiagnosticsWindow (2)
RoutingWebSite (1)
RunTests (6)
SemanticSearch.BuildTask (2)
SocialSample (1)
Sockets.BindTests (9)
Sockets.FunctionalTests (5)
System.Collections.Immutable (7)
System.ComponentModel.Annotations (4)
System.ComponentModel.Composition (9)
System.Composition.Hosting (10)
System.Composition.Runtime (2)
System.Composition.TypedParts (2)
System.Data.Common (2)
System.Drawing.Common.Tests (11)
System.IO.IsolatedStorage (2)
System.Linq.Expressions (1)
System.Linq.Parallel (1)
System.Linq.Queryable (5)
System.Private.Windows.Core (1)
System.Private.Windows.Core.TestUtilities (7)
System.Reflection.DispatchProxy (1)
System.Text.Json.SourceGeneration (2)
System.Text.RegularExpressions.Generator (4)
System.Threading.Tasks.Dataflow (2)
System.Windows.Forms (5)
System.Windows.Forms.Design (1)
System.Windows.Forms.Design.Tests (18)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (27)
System.Windows.Forms.UI.IntegrationTests (2)
System.Xaml.Tests (2)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (4)
TestingAppHost1.MyWebApp (1)
vbc (1)
VBCSCompiler (1)
VBCSCompiler.UnitTests (2)
Wasm.Performance.TestApp (1)
WsFedSample (1)
XmlFormattersWebSite (3)
xunit.assert (12)
Sdk\ArgumentFormatter.cs (5)
267 : string.Format(CultureInfo.CurrentCulture, "Task<{0}>", string.Join(",", typeParameters.Select(t => FormatTypeName(t))));
337 .Select(f => new { name = f.Name, value = WrapAndGetFormattedValue(() => f.GetValue(value), depth) });
343 .Select(p => new { name = p.Name, value = WrapAndGetFormattedValue(() => p.GetValue(value), depth) });
355 var formattedParameters = string.Join(", ", parameters.Take(MAX_OBJECT_ITEM_COUNT).Select(p => string.Format(CultureInfo.CurrentCulture, "{0} = {1}", p.name, p.value)));
532 result = string.Format(CultureInfo.CurrentCulture, "{0}<{1}>", result, string.Join(", ", typeInfo.GenericTypeArguments.Select(t => FormatTypeName(t))));
xunit.console (23)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (14)
57internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache..ctor] Runtime graph: [{string.Join(",", dependencyContext.RuntimeGraph.Select(x => $"'{x.Runtime}'"))}]"));
62internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache..ctor] Compatible runtimes: [{string.Join(",", compatibleRuntimes.Select(x => $"'{x}'"))}]"));
68.Select(lib => compatibleRuntimes.Select(runtime => Tuple.Create(lib, lib.RuntimeAssemblyGroups.FirstOrDefault(libGroup => string.Equals(libGroup.Runtime, runtime))))
72.Select(path => Tuple.Create(Path.GetFileNameWithoutExtension(path), Tuple.Create(tuple.Item1, tuple.Item2))))
76internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache..ctor] Managed assembly map: [{string.Join(",", managedAssemblyMap.Keys.Select(k => $"'{k}'").OrderBy(k => k, StringComparer.OrdinalIgnoreCase))}]"));
82.Select(lib => compatibleRuntimes.Select(runtime => Tuple.Create(lib, lib.NativeLibraryGroups.FirstOrDefault(libGroup => string.Equals(libGroup.Runtime, runtime))))
86.Select(path => Tuple.Create(Path.GetFileName(path), Tuple.Create(tuple.Item1, tuple.Item2))))
90internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache..ctor] Unmanaged assembly map: [{string.Join(",", unmanagedAssemblyMap.Keys.Select(k => $"'{k}'").OrderBy(k => k, StringComparer.OrdinalIgnoreCase))}]"));
253internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache.ResolveManagedAssembly] Resolving '{assemblyName}', found a resolved path, but could not map a filename in [{string.Join(",", assemblies.OrderBy(k => k, StringComparer.OrdinalIgnoreCase).Select(k => $"'{k}'"))}]"));
259internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache.ResolveManagedAssembly] Resolving '{assemblyName}', found in dependency map, but unable to resolve a path in [{string.Join(",", assetGroup.AssetPaths.OrderBy(k => k, StringComparer.OrdinalIgnoreCase).Select(k => $"'{k}'"))}]"));
286internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache.ResolveUnmanagedLibrary] Found a resolved path, but could not map a filename in [{string.Join(",", assemblies.OrderBy(k => k, StringComparer.OrdinalIgnoreCase).Select(k => $"'{k}'"))}]"));
291internalDiagnosticsMessageSink.OnMessage(new _DiagnosticMessage($"[DependencyContextAssemblyCache.ResolveUnmanagedLibrary] Found in dependency map, but unable to resolve a path in [{string.Join(",", assetGroup.AssetPaths.OrderBy(k => k, StringComparer.OrdinalIgnoreCase).Select(k => $"'{k}'"))}]"));
ConsoleRunner.cs (4)
138foreach (var dllFile in Directory.GetFiles(runnerPath, "*.dll").Select(f => Path.Combine(runnerPath, f)))
288var tasks = project.Assemblies.Select(assembly => Task.Run(() => ExecuteAssembly(consoleLock, assembly, serialize, needsXml, parallelizeTestCollections, maxThreadCount, diagnosticMessages, noColor, appDomains, failSkips, stopOnFail, project.Filters, internalDiagnosticMessages)));
388filteredTestCases = filteredTestCases.Select(controller.Serialize).Select(controller.Deserialize).ToList();