521 references to Cast
aspire (6)
Aspire.Cli.Tests (99)
Commands\AddCommandTests.cs (15)
76return choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>()
227choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>().First().Package.Source);
229choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>(),
316return choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>()
419var byLabel = choices.Cast<object>().ToDictionary(choice => formatter(choice));
3599PromptForSelectionCallback = (_, choices, _, _) => choices.Cast<object>().First()
3643var choicesList = choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>().ToList();
3691var choicesList = choices.Cast<object>().ToList();
3739var choicesList = choices.Cast<object>().ToList();
3796var choicesList = choices.Cast<object>().ToList();
3839var choicesList = choices.Cast<object>().ToList();
3897PromptForSelectionCallback = (_, choices, _, _) => choices.Cast<object>().First()
4046choices.Cast<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>()
4172return choices.Cast<object>().First();
4232PromptForSelectionCallback = (message, choices, formatter, ct) => choices.Cast<object>().First()
Commands\AgentInitClientSelectionTests.cs (14)
97Assert.Equal(expectedClients.Split(','), agentPrompt.PreSelected.Cast<IAgentClient>().Select(client => client.Id), StringComparers.AgentClientId);
292Assert.Equal(["copilot", "claude", "opencode"], choices.Cast<IAgentClient>().Select(client => client.Id), StringComparers.AgentClientId);
334labels.AddRange(choices.Cast<object>().Select(formatter));
335return choices.Cast<IAgentClient>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
473return choices.Cast<IAgentClient>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
477Assert.Equal(["aspire", "playwright-cli"], choices.Cast<string>());
490Assert.Equal([AgentConfigurationScope.Project, AgentConfigurationScope.Global], choices.Cast<AgentConfigurationScope>());
496choices.Cast<object>().Select(formatter));
542return choices.Cast<IAgentClient>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
585? choices.Cast<IAgentClient>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray() : [];
Commands\NewCommandLocalTemplateTests.cs (10)
109Assert.Equal([defaultValue, "unused"], options.Cast<string>());
110return options.Cast<string>().First();
126? ["web", "worker", "api"] : ["web", "worker"], prompt.PreSelected.Cast<string>());
148Assert.Equal(["api", "worker"], choices.Cast<string>());
154Assert.Equal(["web", "worker"], choices.Cast<string>());
186var options = choices.Cast<object>().ToArray();
228var options = choices.Cast<object>().ToArray();
280var options = choices.Cast<object>().ToArray();
1167Assert.Equal(["api", "worker"], choices.Cast<string>().Select(choice => formatter(choice)));
1173Assert.Equal(["web", "worker"], choices.Cast<string>().Select(choice => formatter(choice)));
Aspire.Dashboard (10)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (26)
Aspire.Hosting (6)
Aspire.Hosting.Azure.EntraId.Tests (1)
Aspire.Hosting.Azure.Provisioning.Tests (1)
Aspire.Hosting.Azure.Sandboxes (1)
Aspire.Hosting.EntityFrameworkCore.Tests (2)
Aspire.Hosting.JavaScript (1)
Aspire.Hosting.JavaScript.Tests (1)
Aspire.Hosting.Kubernetes.Tests (2)
Aspire.Hosting.Native.Core.Tests (1)
Aspire.Hosting.Native.Server (2)
Aspire.Hosting.Radius.Tests (1)
Aspire.Hosting.RemoteHost (1)
Aspire.Hosting.RemoteHost.Tests (1)
Aspire.Hosting.Tests (6)
Aspire.TerminalHost (1)
Aspire.TerminalHost.Tests (1)
dotnet-svcutil-lib (4)
GenerateDocumentationAndConfigFiles (10)
ILCompiler.Compiler (1)
illink (2)
ILLink.RoslynAnalyzer (3)
Infrastructure.Tests (2)
Microsoft.Analyzers.Local (2)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Testing.Generators (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.Components.WebView.Wpf (2)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.Build (9)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (6)
Microsoft.CodeAnalysis.Analyzers (10)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp (10)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
Microsoft.CodeAnalysis.CSharp.Features (9)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (3)
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
Microsoft.CodeAnalysis.Extensions.Package (5)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.NetAnalyzers (11)
Microsoft.CodeAnalysis.Razor.Compiler (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
Microsoft.CodeAnalysis.VisualBasic (13)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (20)
CodeGeneration\VisualBasicSyntaxGenerator.vb (14)
175SyntaxFactory.SeparatedList(typeArguments.Cast(Of TypeSyntax)()))).WithAdditionalAnnotations(Simplifier.Annotation)
441SyntaxFactory.List(caseClauses.Cast(Of CaseBlockSyntax)))
452SyntaxFactory.CaseStatement(SyntaxFactory.SeparatedList(labels.Cast(Of CaseClauseSyntax))),
525Return SyntaxFactory.TupleType(SyntaxFactory.SeparatedList(elements.Cast(Of TupleElementSyntax)()))
539Return SyntaxFactory.GenericName(sname.Identifier, SyntaxFactory.TypeArgumentList(SyntaxFactory.SeparatedList(typeArguments.Cast(Of TypeSyntax)())))
590If(catchClauses IsNot Nothing, SyntaxFactory.List(catchClauses.Cast(Of CatchBlockSyntax)()), Nothing),
925parameterList:=SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(parameters.Cast(Of ParameterSyntax))),
1171parameterList:=If(parameters IsNot Nothing, SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(parameters.Cast(Of ParameterSyntax)())), SyntaxFactory.ParameterList())),
1199Dim itypes = If(interfaceTypes IsNot Nothing, interfaceTypes.Cast(Of TypeSyntax), Nothing)
1236Dim itypes = If(interfaceTypes IsNot Nothing, interfaceTypes.Cast(Of TypeSyntax), Nothing)
1249members:=If(members IsNot Nothing, SyntaxFactory.List(members.Cast(Of StatementSyntax)()), Nothing))
1259Dim itypes = If(interfaceTypes IsNot Nothing, interfaceTypes.Cast(Of TypeSyntax), Nothing)
2540Dim typeParameterList = SyntaxFactory.TypeParameterList(SyntaxFactory.SeparatedList(typeParameterNodes.Cast(Of TypeParameterSyntax)))
2694statement.CaseBlocks.InsertRange(index, switchSections.Cast(Of CaseBlockSyntax)))
Microsoft.CodeAnalysis.Workspaces (13)
Microsoft.Data.Analysis.Tests (3)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Cli.Definitions (1)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.SqlServer (1)
Microsoft.Extensions.DependencyModel (3)
Microsoft.Gen.Logging (3)
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Maui.Controls (12)
Microsoft.Maui.Controls.Maps (3)
Microsoft.ML.AutoML (1)
Microsoft.ML.AutoML.Tests (7)
Microsoft.ML.CodeGenerator (1)
Microsoft.ML.Data (3)
Microsoft.ML.Fairlearn (1)
Microsoft.ML.Predictor.Tests (1)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.Sweeper (4)
Microsoft.ML.Transforms (3)
Microsoft.NET.Build.Tasks (2)
Microsoft.Private.Windows.Core (1)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TemplateEngine.Edge (1)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
NativeIntegrations.DockerCompose (1)
NativeIntegrations.Redis.Provider (1)
NuGet.Common (1)
NuGet.Configuration (1)
NuGet.Packaging (1)
Roslyn.Diagnostics.Analyzers (10)
Roslyn.Diagnostics.CSharp.Analyzers (12)
Roslyn.Diagnostics.VisualBasic.Analyzers (6)
sdk-tasks (1)
System.CommandLine (2)
System.ComponentModel.Composition (1)
System.Composition.Runtime (2)
System.Data.Common (5)
System.Private.Windows.Core.TestUtilities (1)
System.Text.RegularExpressions.Generator (2)
System.Windows.Forms (1)
System.Windows.Forms.Design (8)
vstest.console (1)
vstest.console.arm64 (1)