95 references to Select
Aspire.Dashboard (1)
ResourceService\Partials.cs (1)
103.Select((v, i) => new VolumeViewModel(i, v.Source, v.Target, v.MountType, v.IsReadOnly))
Aspire.Dashboard.Tests (1)
Model\ResourceViewModelTests.cs (1)
30var reports = healthStatusStrings?.Select<string?, HealthReportViewModel>((h, i) => new HealthReportViewModel(i.ToString(), h is null ? null : System.Enum.Parse<DiagnosticsHealthStatus>(h), null, null)).ToImmutableArray() ?? [];
Aspire.Hosting.Tests (1)
Health\HealthStatusTests.cs (1)
26var reports = healthStatusStrings?.Select<string?, HealthReportSnapshot>((h, i) => new HealthReportSnapshot(i.ToString(), h is null ? null : Enum.Parse<HealthStatus>(h), null, null)).ToImmutableArray() ?? [];
CodeGenerator (5)
FeatureCollectionGenerator.cs (1)
12var features = allFeatures.Select((type, index) => new KnownFeature
src\Servers\Kestrel\shared\KnownHeaders.cs (4)
179.Select((header, index) => new KnownHeader 250.Select((header, index) => new KnownHeader 277.Select((header, index) => new KnownHeader 315return values.Any() ? values.Select(formatter).Aggregate((a, b) => a + b) : "";
CSharpSyntaxGenerator (2)
SourceWriter.cs (2)
940var relevantNodes = nodeFields.Select((field, index) => (field, index)) 986var relevantNodes = nodeFields.Select((field, index) => (field, index))
dotnet-dev-certs (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
dotnet-user-jwts (1)
Helpers\ConsoleTable.cs (1)
51.Select((t, i) => _rows.Select(x => x[i])
installer.tasks (1)
StaticFileRegeneration\TpnDocument.cs (1)
17.Select((h, i) =>
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
28var parameterTypeList = string.Join(", ", endpoint.Parameters.Select((p, i) => $"{EmitUnwrappedParameterType(p)} arg{i}{(p.HasDefaultValue ? $"= {p.DefaultValue}" : string.Empty)}"));
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\ApplicationModelFactory.cs (1)
210.Select((error, i) =>
Microsoft.AspNetCore.Routing.Tests (2)
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (1)
625var table = policy.BuildJumpTable(-100, edges.Select((e, i) => new PolicyJumpTableEdge(e.State, i + 1)).ToArray());
Matching\ILEmitTrieJumpTableTest.cs (1)
235var entries = segments.Select((e, i) => (e, i + 1)).ToArray();
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
src\Servers\Kestrel\shared\KnownHeaders.cs (4)
179.Select((header, index) => new KnownHeader 250.Select((header, index) => new KnownHeader 277.Select((header, index) => new KnownHeader 315return values.Any() ? values.Select(formatter).Aggregate((a, b) => a + b) : "";
Microsoft.Build.Engine.UnitTests (2)
Definition\ProjectEvaluationContext_Tests.cs (2)
720.Select((p, i) => new ProjectSpecification(Path.Combine(testDirectory.Path, $"ProjectDirectory{i}", $"Project{i}.proj"), p)); 958projectContents.Select((p, i) => new ProjectSpecification(Path.Combine(_env.DefaultTestDirectory.Path, $"Project{i}.proj"), p)),
Microsoft.CodeAnalysis (1)
Emit\EditAndContinue\EncVariableSlotAllocator.cs (1)
112builder.AddRange(_previousLocals.Select((info, index) =>
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
272.AddSyntaxTrees(sources.Select((s, i) => SyntaxFactory.ParseSyntaxTree(s, options: parseOptions, path: sourceCodePaths[i]))) 290embeddedTexts = sources.Select((s, i) => EmbeddedText.FromSource(sourceCodePaths[i], s)).ToArray();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\TypeDefinitionDocumentTests.cs (1)
463var trees = sources.Select((s, i) => SyntaxFactory.ParseSyntaxTree(s, path: $"{i + 1}.cs", encoding: Encoding.UTF8)).ToArray();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1115return sources.Select((src, index) => Parse(src, filename: $"{index}.cs", options: options)).ToArray();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
857var parameters = parameterTypes.Select((t, i) => Generator.ParameterDeclaration("p" + i, Generator.TypeExpression(t))).ToList();
Microsoft.CodeAnalysis.Features (2)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
857var assignments = tupleType.TupleElements.Select(
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
156.Select((argument, i) => ShouldAddName(argument, i)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\CodeFixes\CodeFixService.cs (1)
1002_fixerToIndex = allFixers.Select((fixer, index) => (fixer, index)).ToDictionary(t => t.fixer, t => t.index);
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\DiagnosticExtensions.cs (2)
77var unmatchedActualIndex = actual.Select((_, i) => i).ToList(); 98var text = DiagnosticDescription.GetAssertText(expected, actual, unmatchedExpected.ToArray(), actual.Select((a, i) => (a, i)).Join(unmatchedActualIndex, ai => ai.i, i => i, (ai, _) => ai.a));
Microsoft.CodeAnalysis.UnitTests (1)
LineMappingTests.cs (1)
32var equalityUnits = lineMappings.SelectMany((left, leftIndex) => lineMappings.Select((right, rightIndex) => CreateEqualityUnit(left, leftIndex, right, rightIndex))).ToArray();
Microsoft.Interop.SourceGeneration (1)
DiagnosticOr.cs (1)
131var values = provider.Select((arr, ct) => arr.Where(x => x.HasValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray());
Microsoft.ML.AutoML (5)
ColumnInference\TextFileSample.cs (1)
144.Select((spot, i) => (long)(spot + firstChunk.Length + i * chunkSize))
SweepableEstimator\SweepableEstimatorPipeline.cs (1)
53var kvPairs = _estimators.Select((e, i) => new KeyValuePair<string, SearchSpace.SearchSpace>(i.ToString(), e.SearchSpace));
SweepableEstimator\SweepablePipeline.cs (1)
52var kvPairs = _estimators.Select((e, i) => new KeyValuePair<string, Parameter>(i.ToString(), e.Value.Parameter));
Utils\ArrayMath.cs (1)
149var ape = diff.Select((x, i) => Math.Abs(x) / truth[i]);
Utils\BestResultUtil.cs (1)
78var indexedValues = results.Select((k, v) => (k, v));
Microsoft.ML.Core (2)
CommandLine\CmdParser.cs (1)
1346Contracts.Assert(args.Select((arg, index) => arg.Index == index).All(b => b));
Utilities\ReservoirSampler.cs (1)
196var tmp = _counts.Select((count, i) => new KeyValuePair<int, int>(count, i)).First(kvp => kvp.Key == 0);
Microsoft.ML.Data (12)
DataLoadSave\LegacyCompositeDataLoader.cs (1)
533.Select((xf, i) => new TransformEx(GenerateTag(i), null, xf))
DataView\ZipDataView.cs (1)
88.Select((dv, i) => srcPredicates[i] == null ? GetMinimumCursor(dv) : dv.GetRowCursor(dv.Schema.Where(x => srcPredicates[i](x.Index)), null)).ToArray();
Evaluators\EvaluatorUtils.cs (2)
771var foldDataViews = perInstance.Select(getPerInstance).ToArray(); 942return AppendRowsDataView.Create(env, null, views.Select(keyToValue).Select(selectDropNonVarLenthCol).ToArray());
Transforms\NormalizeColumnDbl.cs (4)
442get { return _m2.Select((m2, i) => Math.Sqrt(m2 / _cnz[i])).ToArray(); } 447get { return _m2.Select((m2, i) => Math.Sqrt(m2 / Math.Max(0, _cnz[i] - 1))).ToArray(); } 452get { return _m2.Select((m2, i) => m2 / _cnz[i]).ToArray(); } 457get { return _m2.Select((m2, i) => m2 / Math.Max(0, _cnz[i] - 1)).ToArray(); }
Transforms\NormalizeColumnSng.cs (4)
443get { return _m2.Select((m2, i) => Math.Sqrt(m2 / _cnz[i])).ToArray(); } 448get { return _m2.Select((m2, i) => Math.Sqrt(m2 / Math.Max(0, _cnz[i] - 1))).ToArray(); } 453get { return _m2.Select((m2, i) => m2 / _cnz[i]).ToArray(); } 458get { return _m2.Select((m2, i) => m2 / Math.Max(0, _cnz[i] - 1)).ToArray(); }
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
85var res = GroupIds.Select((id, i) =>
Microsoft.ML.FastTree (2)
Dataset\FeatureFlock.cs (1)
1183Contracts.Assert(AllBinUpperBounds.Select((b, f) => HotFeatureStarts[f + 1] - HotFeatureStarts[f] + 1 == b.Length).All(i => i));
GamModelParameters.cs (1)
177int diff = _binEffects.Sum(e => e.Take(e.Length - 1).Select((ef, i) => ef != e[i + 1] ? 1 : 0).Sum());
Microsoft.ML.ImageAnalytics (2)
ImagePixelExtractor.cs (1)
292=> _parent._columns.Select((x, idx) => new DataViewSchema.DetachedColumn(x.Name, _types[idx], null)).ToArray();
VectorToImageTransform.cs (1)
323=> _parent._columns.Select((x, idx) => new DataViewSchema.DetachedColumn(x.Name, _types[idx], null)).ToArray();
Microsoft.ML.IntegrationTests (1)
SchemaDefinitionTests.cs (1)
57Assert.True(prediction.Features.Select((x, i) => i == 3 && x == 1 || x == 0).All(b => b));
Microsoft.ML.Samples (16)
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportance.cs (1)
51.Select((metrics, index) => new { index, metrics.AreaUnderRocCurve })
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
50.Select((metrics, index) => new { index, metrics.AreaUnderRocCurve })
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportance.cs (1)
54.Select((metrics, index) => new { index, metrics.MicroAccuracy })
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
62.Select((metrics, index) => new { index, metrics.MicroAccuracy })
Dynamic\Trainers\Ranking\FastTree.cs (2)
117metrics.DiscountedCumulativeGains.Select( 121metrics.NormalizedDiscountedCumulativeGains.Select(
Dynamic\Trainers\Ranking\FastTreeWithOptions.cs (2)
131metrics.DiscountedCumulativeGains.Select( 134metrics.NormalizedDiscountedCumulativeGains.Select(
Dynamic\Trainers\Ranking\LightGbm.cs (2)
117metrics.DiscountedCumulativeGains.Select( 120metrics.NormalizedDiscountedCumulativeGains.Select(
Dynamic\Trainers\Ranking\LightGbmWithOptions.cs (2)
132metrics.DiscountedCumulativeGains.Select( 135metrics.NormalizedDiscountedCumulativeGains.Select(
Dynamic\Trainers\Ranking\PermutationFeatureImportance.cs (1)
51var sortedIndices = permutationMetrics.Select((metrics, index) => new
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (1)
58var sortedIndices = permutationMetrics.Select((metrics, index) => new
Dynamic\Trainers\Regression\PermutationFeatureImportance.cs (1)
52.Select((metrics, index) => new
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (1)
59.Select((metrics, index) => new
Microsoft.ML.SearchSpace.Tests (2)
UniformNumericOptionTests.cs (2)
82sampleOutputs.Select((x, i) => (x.AsType<double>(), i * 10)) 95sampleOutputs.Select((x, i) => (x.AsType<double>(), Math.Pow(2, i)))
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
216return sweeps.Select((sweep, j) =>
Microsoft.ML.Tests (1)
Scenarios\Api\TestApi.cs (1)
252Assert.True(retrievedReadOnlyMemoryVBuffer.DenseValues().Select((s, i) => s.ToString() == valueStringArray[i]).All(b => b));
Microsoft.ML.TimeSeries (3)
SeasonalityDetector.cs (3)
88var energies = fftRe.Select((m, i) => new Complex(m, fftIm[i])).ToArray(); 94var periodogram = energies.Select((t, i) => t * Complex.Conjugate(t)).ToArray(); 105var values = ifftRe.Select((t, i) => new Complex(t, ifftIm[i])).ToArray();
Roslyn.Test.PdbUtilities (2)
Reader\PdbValidation.cs (2)
659var expectedTags = pdbXml.DescendantsAndSelf("closure").Select((c, i) => new { Tag = $"<C:{i}>", StartIndex = methodStart + int.Parse(c.Attribute("offset").Value) }).ToList(); 662expectedTags.AddRange(pdbXml.DescendantsAndSelf("lambda").Select((c, i) => new { Tag = $"<L:{i}.{int.Parse(c.Attribute("closure").Value)}>", StartIndex = methodStart + int.Parse(c.Attribute("offset").Value) }));
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (1)
182return Child.AsSequentialQuery(token).Select(_selector);
Templates.Blazor.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Templates.Mvc.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
Templates.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
853var description = list.OrderBy(c => c.Thumbprint).Select((c, i) => $" {i + 1}) " + GetDescription(c)).Prepend(certificatesDescription);
xunit.assert (1)
Sdk\Exceptions\CollectionException.cs (1)
57 .Select((value, idx) => idx > 0 ? " " + value : value);