2043 references to Cast
Aspire.Dashboard (2)
Extensions\TelemetryFilterFormatter.cs (1)
99.Cast<TelemetryFilter>()
Otlp\Model\OtlpHelpers.cs (1)
419items = query.Cast<TResult>().ToList();
AzureAppServicesHostingStartupSample (1)
Startup.cs (1)
48foreach (var key in vars.Keys.Cast<string>().OrderBy(key => key, StringComparer.OrdinalIgnoreCase))
AzureAppServicesSample (1)
Startup.cs (1)
59foreach (var key in vars.Keys.Cast<string>().OrderBy(key => key, StringComparer.OrdinalIgnoreCase))
DefaultBuilder.SampleApp (1)
Startup.cs (1)
39foreach (var key in vars.Keys.Cast<string>().OrderBy(key => key, StringComparer.OrdinalIgnoreCase))
dotnet-svcutil-lib (4)
CodeSerializer.cs (2)
137var wsdlDocuments = metadataSections.Where(s => s.Metadata is WsdlNS.ServiceDescription).Cast<WsdlNS.ServiceDescription>(); 167var schemaDocuments = metadataSections.Where(s => s.Metadata is XmlSchema).Cast<XmlSchema>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (2)
1032var constructorInfo = FilterMethodBases(constructorInfos.Cast<MethodBase>().ToArray(), parameterTypes, ".ctor"); 1039var methodInfo = FilterMethodBases(methodInfos.Cast<MethodBase>().ToArray(), parameterTypes, methodName);
IISSample (1)
Startup.cs (1)
75foreach (var key in vars.Keys.Cast<string>().OrderBy(key => key, StringComparer.OrdinalIgnoreCase))
illink (2)
ILLink.RoslynAnalyzer (3)
DataFlow\ControlFlowGraphExtensions.cs (1)
34 => cfg.DescendantOperations ().Where (d => d?.Kind == operationKind).Cast<T> ();
src\tools\illink\src\ILLink.Shared\Annotations.cs (1)
81 .Cast<DynamicallyAccessedMemberTypes> ());
TrimAnalysis\TrimAnalysisVisitor.cs (1)
111 foreach (var array in arrayValue.AsEnumerable ().Cast<ArrayValue> ()) {
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Microsoft.Analyzers.Local (2)
ApiLifecycle\ApiLifecycleAnalyzer.cs (2)
54.Cast<INamedTypeSymbol>(); 148.Cast<INamedTypeSymbol>();
Microsoft.AspNetCore.Analyzers.Test (4)
StartupFactsTest.cs (4)
119var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 144var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 167var methods = type.GetMembers(methodName).Cast<IMethodSymbol>(); 189var methods = type.GetMembers(methodName).Cast<IMethodSymbol>();
Microsoft.AspNetCore.BrowserTesting (1)
BrowserManager.cs (1)
177result.Add(item.Cast<object>().Prepend(browser).ToArray());
Microsoft.AspNetCore.Components (1)
NavigationManagerExtensions.cs (1)
231var values = ((IEnumerable)value).Cast<object>();
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
BlazorWebView.cs (2)
229 var newItems = (eventArgs.NewItems ?? Array.Empty<object>()).Cast<RootComponent>(); 230 var oldItems = (eventArgs.OldItems ?? Array.Empty<object>()).Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.Wpf (2)
BlazorWebView.cs (2)
316 var newItems = (eventArgs.NewItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>(); 317 var oldItems = (eventArgs.OldItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
238.Cast<RouteEndpoint>()
Microsoft.AspNetCore.InternalTesting (1)
xunit\AspNetTestAssemblyRunner.cs (1)
43.Cast<AssemblyFixtureAttribute>()
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\HasValidatorsValidationMetadataProvider.cs (1)
21_validatorProviders = modelValidatorProviders.Cast<IMetadataBasedModelValidatorProvider>().ToArray();
Microsoft.AspNetCore.Mvc.Core.Test (7)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (5)
123var main = Assert.Single(descriptors.Cast<ControllerActionDescriptor>(), 142var main = Assert.Single(descriptors.Cast<ControllerActionDescriptor>(), 167var main = Assert.Single(descriptors.Cast<ControllerActionDescriptor>(), 200var fromBody = Assert.Single(descriptors.Cast<ControllerActionDescriptor>(), 221var notFromBody = Assert.Single(descriptors.Cast<ControllerActionDescriptor>(),
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (2)
122var properties1 = provider.GetMetadataForProperties(typeof(ModelType)).Cast<DefaultModelMetadata>().ToArray(); 123var properties2 = provider.GetMetadataForProperties(typeof(ModelType)).Cast<DefaultModelMetadata>().ToArray();
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Rendering\MultiSelectList.cs (1)
183selectedValues.UnionWith(SelectedValues.Cast<object>());
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
432return xpathResult?.Cast<XNode>().ToArray();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
HubConnectionTests.cs (3)
1455var transportType = TransportTypes().First().Cast<HttpTransportType>().First(); 2996foreach (var transport in TransportTypes().SelectMany(t => t).Cast<HttpTransportType>()) 3012foreach (var transport in TransportTypes().SelectMany(t => t).Cast<HttpTransportType>())
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisProtocolTests.cs (1)
146var protocol = new RedisProtocol(CreateHubMessageSerializer(hubProtocols.Cast<IHubProtocol>().ToList()));
Microsoft.Build (4)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
1414newItem.SetMetadataOnTaskOutput(outputAsITaskItem2.CloneCustomMetadataEscaped().Cast<KeyValuePair<string, string>>());
Construction\ProjectElementContainer.cs (1)
628if (XmlElement.ChildNodes.Cast<XmlNode>().All(c => c.NodeType == XmlNodeType.Whitespace))
Evaluation\Expander.cs (1)
4280members = foundMembers.Cast<MethodBase>();
Instance\ProjectItemInstance.cs (1)
285get { return new ReadOnlyCollection<string>(_taskItem.MetadataNames.Cast<string>()); }
Microsoft.Build.CommandLine.UnitTests (1)
CommandLineSwitches_Tests.cs (1)
1545.Cast<DictionaryEntry>().Where(i => i.Key is string && ((string)i.Key).StartsWith("HelpMessage_"))
Microsoft.Build.Engine.UnitTests (2)
BuildEventArgsSerialization_Tests.cs (1)
1059BinaryLogRecordKind unknownType = (BinaryLogRecordKind)Enum.GetValues(typeof(BinaryLogRecordKind)).Cast<BinaryLogRecordKind>().Select(e => (int)e).Max() + 2;
Instance\TaskItem_Tests.cs (1)
191item.MetadataNames.Cast<string>().ShouldBeSetEquivalentTo(new[] { "a", "b" }.Concat(s_builtInMetadataNames));
Microsoft.Build.Framework (1)
ProjectStartedEventArgs.cs (1)
386var validProperties = properties.Cast<DictionaryEntry>().Where(entry => entry.Key != null && entry.Value != null);
Microsoft.Build.Tasks.UnitTests (11)
RoslynCodeTaskFactory_Tests.cs (2)
286foreach (RoslynCodeTaskFactoryCodeType codeType in Enum.GetValues(typeof(RoslynCodeTaskFactoryCodeType)).Cast<RoslynCodeTaskFactoryCodeType>()) 298foreach (RoslynCodeTaskFactoryCodeType codeType in Enum.GetValues(typeof(RoslynCodeTaskFactoryCodeType)).Cast<RoslynCodeTaskFactoryCodeType>())
XmlPeek_Tests.cs (1)
358Assert.Equal(["abcdefg", "a%24%28d%29fg", "a%24%28d.f%29"], p.Result.Cast<TaskItem>().Select(x => x.ToString()));
XmlPoke_Tests.cs (8)
57List<XmlAttribute> nodes = xmlDocument.SelectNodes(query, ns)?.Cast<XmlAttribute>().ToList(); 74List<XmlAttribute> nodes = xmlDocument.SelectNodes(query)?.Cast<XmlAttribute>().ToList(); 91List<XmlAttribute> nodes = xmlDocument.SelectNodes(query)?.Cast<XmlAttribute>().ToList(); 108List<XmlElement> nodes = xmlDocument.SelectNodes(query)?.Cast<XmlElement>().ToList(); 114var testNodes = nodes?.First().ChildNodes.Cast<XmlElement>().ToList(); 132List<XmlAttribute> nodes = xmlDocument.SelectNodes(string.Format(queryTemplate, value))?.Cast<XmlAttribute>().ToList(); 213List<XmlAttribute> nodes = xmlDocument.SelectNodes(query)?.Cast<XmlAttribute>().ToList(); 302List<XmlElement> nodes = xmlDocument.SelectNodes(query)?.Cast<XmlElement>().ToList();
Microsoft.Build.Utilities.UnitTests (2)
TaskItem_Tests.cs (2)
91taskItem.MetadataNames.Cast<string>().ShouldBeSetEquivalentTo(FileUtilities.ItemSpecModifiers.All); 97taskItem.MetadataNames.Cast<string>().ShouldBeSetEquivalentTo(FileUtilities.ItemSpecModifiers.All.Concat(new[] { "m" }));
Microsoft.CodeAnalysis (6)
InternalUtilities\EnumerableExtensions.cs (5)
214return source.Cast<T?>().FirstOrDefault(); 230return source.Cast<T?>().FirstOrDefault(static (v, predicate) => predicate(v!.Value), predicate); 246return source.Cast<T?>().FirstOrDefault(static (v, arg) => arg.predicate(v!.Value, arg.arg), (predicate, arg)); 257return source.Cast<T?>().LastOrDefault(); 268return source.Cast<T?>().SingleOrDefault(v => predicate(v!.Value));
TreeDumper.cs (1)
220return string.Format("{{{0}}}", string.Join(", ", seq.Cast<object>().Select(DumperString).ToArray()));
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.ValuePool.cs (1)
29int[] values = Enum.GetValues(typeof(PropertySetAbstractValueKind)).Cast<int>().ToArray();
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (2)
174foreach (DataFlowAnalysisResult<TBlockAnalysisResult, TAbstractAnalysisValue> result in _interproceduralResultsMap.Values.Cast<DataFlowAnalysisResult<TBlockAnalysisResult, TAbstractAnalysisValue>>()) 191foreach (DataFlowAnalysisResult<TBlockAnalysisResult, TAbstractAnalysisValue> result in _standaloneLocalFunctionAnalysisResultsMap.Values.Cast<DataFlowAnalysisResult<TBlockAnalysisResult, TAbstractAnalysisValue>>())
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
214return source.Cast<T?>().FirstOrDefault(); 230return source.Cast<T?>().FirstOrDefault(static (v, predicate) => predicate(v!.Value), predicate); 246return source.Cast<T?>().FirstOrDefault(static (v, arg) => arg.predicate(v!.Value, arg.arg), (predicate, arg)); 257return source.Cast<T?>().LastOrDefault(); 268return source.Cast<T?>().SingleOrDefault(v => predicate(v!.Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ControlFlowGraphExtensions.cs (1)
32=> cfg.DescendantOperations().Where(d => d?.Kind == operationKind).Cast<T>();
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
52foreach (var symbol in Sort(symbolInfo.CandidateSymbols.Cast<ITypeSymbol>(), placementOption.PlaceSystemNamespaceFirst))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return [.. _constructedFrom.TypeMembers.Cast<INamedTypeSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
166=> [.. this.TypeMembers.Cast<INamedTypeSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
138return [.. newTypeParameters.Cast<ITypeParameterSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
128FirstStatementAffectedInInnermostBlock = InnermostBlockStatements.Cast<TStatementSyntax>().FirstOrDefault(allAffectedStatements.Contains);
Microsoft.CodeAnalysis.CSharp (10)
Compilation\CSharpCompilation.cs (2)
865foreach (var tree in trees.Cast<CSharpSyntaxTree>()) 939foreach (var tree in trees.Cast<CSharpSyntaxTree>())
Symbols\Source\SourcePropertySymbolBase.cs (1)
1698=> GetAttributes().Where(a => a.IsTargetAttribute(attributeDescription)).Cast<SourceAttributeData>().ToImmutableArray();
Syntax\CSharpSyntaxNode.cs (1)
507return SyntaxNodeRemover.RemoveNodes(this, nodes.Cast<CSharpSyntaxNode>(), options).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree);
Syntax\SyntaxReplacer.cs (6)
449return list.ReplaceRange((TNode)_originalNode, _newNodes.Cast<TNode>()); 452return list.InsertRange(index + 1, _newNodes.Cast<TNode>()); 455return list.InsertRange(index, _newNodes.Cast<TNode>()); 473return list.ReplaceRange((TNode)_originalNode, _newNodes.Cast<TNode>()); 476return list.InsertRange(index + 1, _newNodes.Cast<TNode>()); 479return list.InsertRange(index, _newNodes.Cast<TNode>());
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ValidateFormatString\CSharpValidateFormatStringDiagnosticAnalyzer.cs (1)
25foreach (var argument in arguments.Cast<ArgumentSyntax>())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
117var initialList = usingList.Cast<SyntaxNode>()
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
59var newBody = SyntaxFactory.Block(statements.Add(exprOrStatement).Cast<StatementSyntax>()); 79var newBody = SyntaxFactory.Block(statements.Add(generator.ReturnStatement(exprOrStatement)).Cast<StatementSyntax>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
348return Cast<TDeclarationNode>(enumDeclaration.AddMembers([.. members.Cast<EnumMemberDeclarationSyntax>()])); 353return Cast<TDeclarationNode>(typeDeclaration.AddMembers([.. members.Cast<MemberDeclarationSyntax>()])); 357return Cast<TDeclarationNode>(namespaceDeclaration.AddMembers([.. members.Cast<MemberDeclarationSyntax>()])); 362.AddMembers([.. members.Cast<MemberDeclarationSyntax>()]));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
44var clauses = SyntaxFactory.List(allClauses.Take(allClauses.Count() - 1).Cast<QueryClauseSyntax>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
107=> SyntaxFactory.InterpolatedStringExpression(startToken, [.. content.Cast<InterpolatedStringContentSyntax>()], endToken);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
1734Enum.GetValues(typeof(LanguageVersion)).Cast<LanguageVersion>().Select(v => v.ToDisplayString())); 1742.Cast<LanguageVersion>() 1880var expected = Enum.GetValues(typeof(LanguageVersion)).Cast<LanguageVersion>()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
ExtractMethod\ExtractMethodBase.cs (1)
193var iterator = root.DescendantNodesAndSelf().Cast<SyntaxNode>();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (1)
2689string[] actual = Regex.Matches(il, @"\.class nested assembly explicit ansi sealed '([^']*?)'").Cast<Match>().Select(m => m.Groups[1].Value).ToArray();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_Embedded.cs (1)
348var embeddedAttributes = codeAnalysisNamespace.GetMembers("EmbeddedAttribute").Cast<NamedTypeSymbol>().ToArray();
Semantics\PrimaryConstructorTests.cs (1)
135Assert.Equal(MethodKind.Constructor, members.Cast<MethodSymbol>().Single().MethodKind);
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
77sections: [.. sectionList.Cast<SwitchSectionSyntax>()],
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (2)
283return _statementsOrMemberOrAccessorToInsert.Cast<StatementSyntax>().Single(); 308newList.InsertRange(firstIndex, _statementsOrMemberOrAccessorToInsert.Cast<TSyntax>());
src\Analyzers\CSharp\Analyzers\ValidateFormatString\CSharpValidateFormatStringDiagnosticAnalyzer.cs (1)
25foreach (var argument in arguments.Cast<ArgumentSyntax>())
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
59var newBody = SyntaxFactory.Block(statements.Add(exprOrStatement).Cast<StatementSyntax>()); 79var newBody = SyntaxFactory.Block(statements.Add(generator.ReturnStatement(exprOrStatement)).Cast<StatementSyntax>());
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
95foreach (var kind in Enum.GetValues(typeof(SyntaxKind)).Cast<SyntaxKind>().Where(hasLabel))
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (1)
85var implicitSymbols = typeSymbol.GetMembers("op_Implicit").Cast<MethodSymbol>();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
CommandLineRunnerTests.cs (1)
769var expected = Enum.GetValues(typeof(LanguageVersion)).Cast<LanguageVersion>()
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\BindingTests.cs (2)
2365var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.ThisExpression)).Cast<ThisExpressionSyntax>().Single(); 2384var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.ThisExpression)).Cast<ThisExpressionSyntax>().Single();
Semantics\FunctionPointerTests.cs (3)
2229.Cast<IMethodSymbol>() 2290.Cast<IMethodSymbol>() 2363.Cast<IMethodSymbol>()
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
SymbolDisplay\SymbolDisplayTests.cs (3)
7154var declarations = semanticModel.SyntaxTree.GetRoot().DescendantNodes().Where(n => n.Kind() == SyntaxKind.StructDeclaration).Cast<BaseTypeDeclarationSyntax>().ToArray(); 7192var declarations = semanticModel.SyntaxTree.GetRoot().DescendantNodes().Where(n => n.Kind() == SyntaxKind.StructDeclaration).Cast<BaseTypeDeclarationSyntax>().ToArray(); 7230var declarations = semanticModel.SyntaxTree.GetRoot().DescendantNodes().Where(n => n.Kind() == SyntaxKind.StructDeclaration).Cast<BaseTypeDeclarationSyntax>().ToArray();
Symbols\IndexerTests.cs (1)
2539node.DescendantNodesAndSelf().Where(s => s.IsKind(SyntaxKind.ElementAccessExpression)).Cast<ElementAccessExpressionSyntax>();
Symbols\Metadata\PE\LoadingEvents.cs (1)
399int length = 1 + modList.Cast<int>().Max();
Symbols\Metadata\PE\LoadingProperties.cs (1)
314int length = 1 + modList.Cast<int>().Max();
Symbols\Source\EnumTests.cs (1)
1013var fields = symEnum.GetMembers().OfType<FieldSymbol>().Cast<Symbol>().ToList();
Symbols\Source\NullablePublicAPITests.cs (3)
570return syntaxTree.GetRoot().DescendantNodes().OfType<CSharp.Syntax.LocalFunctionStatementSyntax>().Select(func => semanticModel.GetDeclaredSymbol(func)).Cast<IMethodSymbol>().ToArray(); 2056var symbols = variable.DescendantNodes().OfType<SingleVariableDesignationSyntax>().Select(s => model.GetDeclaredSymbol(s)).Cast<ILocalSymbol>().ToList(); 2099var symbols = variable.DescendantNodes().OfType<SingleVariableDesignationSyntax>().Select(s => model.GetDeclaredSymbol(s)).Cast<ILocalSymbol>().ToList();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\LanguageVersionTests.cs (1)
20Cast<LanguageVersion>().
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
CodeGeneration\CSharpSyntaxGenerator.cs (16)
350? SyntaxFactory.ParameterList([.. parameters.Cast<ParameterSyntax>()]) 458var list = SyntaxFactory.List(accessorDeclarations.Cast<AccessorDeclarationSyntax>()); 514? SyntaxFactory.BracketedParameterList([.. parameters.Cast<ParameterSyntax>()]) 1746? SyntaxFactory.TypeParameterList([.. typeParameterNodes.Cast<TypeParameterSyntax>()]) 2159var newSections = statement.Sections.InsertRange(index, switchSections.Cast<SwitchSectionSyntax>()); 3147SyntaxFactory.BracketedArgumentList([.. arguments.Cast<ArgumentSyntax>()])); 3291SyntaxFactory.TypeArgumentList([.. typeArguments.Cast<TypeSyntax>()])); 3299return SyntaxFactory.GenericName(sname.Identifier, SyntaxFactory.TypeArgumentList([.. typeArguments.Cast<TypeSyntax>()])); 3303return gname.WithTypeArgumentList(SyntaxFactory.TypeArgumentList([.. typeArguments.Cast<TypeSyntax>()])); 3371=> SyntaxFactory.TupleType([.. elements.Cast<TupleElementSyntax>()]); 3414catchClauses != null ? [.. catchClauses.Cast<CatchClauseSyntax>()] : default, 3435[.. caseClauses.Cast<SwitchSectionSyntax>()]); 3445[.. caseClauses.Cast<SwitchSectionSyntax>()], 3456[.. labels.Cast<SwitchLabelSyntax>()], 3479=> SyntaxFactory.Block(statements.Cast<StatementSyntax>()); 3486var parameters = parameterDeclarations?.Cast<ParameterSyntax>().ToList();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
117var initialList = usingList.Cast<SyntaxNode>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
348return Cast<TDeclarationNode>(enumDeclaration.AddMembers([.. members.Cast<EnumMemberDeclarationSyntax>()])); 353return Cast<TDeclarationNode>(typeDeclaration.AddMembers([.. members.Cast<MemberDeclarationSyntax>()])); 357return Cast<TDeclarationNode>(namespaceDeclaration.AddMembers([.. members.Cast<MemberDeclarationSyntax>()])); 362.AddMembers([.. members.Cast<MemberDeclarationSyntax>()]));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
44var clauses = SyntaxFactory.List(allClauses.Take(allClauses.Count() - 1).Cast<QueryClauseSyntax>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
107=> SyntaxFactory.InterpolatedStringExpression(startToken, [.. content.Cast<InterpolatedStringContentSyntax>()], endToken);
Microsoft.CodeAnalysis.EditorFeatures (1)
Logging\FunctionIdOptions.cs (1)
38=> Enum.GetValues(typeof(FunctionId)).Cast<FunctionId>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Structure\StructureTaggerTests.cs (1)
323var hints = tags.Select(x => x.GetCollapsedHintForm()).Cast<ViewHostingControl>().ToArray();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
VS\IFSharpWorkspaceProjectContextFactory.cs (2)
152foreach (var reference in _projectReferences.Values.Cast<FSharpWorkspaceProjectContext>()) 157foreach (var reference in projRefs.Cast<FSharpWorkspaceProjectContext>())
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.UnitTests (2)
EnumTests.cs (2)
28var internalValues = Enum.GetValues(internalType).Cast<int>().ToArray(); 30var externalValues = Enum.GetValues(externalType).Cast<int>().ToArray();
Microsoft.CodeAnalysis.Features (5)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
133ae.InnerExceptions.Cast<OperationCanceledException>().Any(NotOurShutdownToken))
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
39.Cast<TriviaLocation>()
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (2)
107.Cast<TriviaLocation>() 132.Cast<TriviaLocation>()
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
52foreach (var symbol in Sort(symbolInfo.CandidateSymbols.Cast<ITypeSymbol>(), placementOption.PlaceSystemNamespaceFirst))
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RudeEditDiagnosticTests.cs (1)
74var allKinds = Enum.GetValues(typeof(RudeEditKind)).Cast<RudeEditKind>();
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
AbstractResxGenerator.cs (1)
850var arguments = match.Cast<Match>()
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\TestOperationVisitor.cs (3)
1473IEnumerable<IOperation> children = operation.Patterns.Cast<IOperation>(); 1515IEnumerable<IOperation> children = operation.DeconstructionSubpatterns.Cast<IOperation>(); 1553var children = operation.Arms.Cast<IOperation>().Prepend(operation.Value);
Diagnostics\TestDiagnosticAnalyzer.cs (1)
30return ImmutableArray.CreateRange(Enum.GetValues(typeof(T)).Cast<T>());
Microsoft.CodeAnalysis.UnitTests (13)
Collections\ImmutableDictionaryBuilderTestBase.cs (2)
182Assert.Equal(new[] { "a" }, dictionary.Keys.Cast<string>().ToArray()); 183Assert.Equal(new[] { 1 }, dictionary.Values.Cast<int>().ToArray());
Collections\ImmutableDictionaryTestBase.cs (2)
178Assert.Equal(new[] { "c" }, dictionary.Keys.Cast<string>().ToArray()); 179Assert.Equal(new[] { 3 }, dictionary.Values.Cast<int>().ToArray());
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (1)
303Assert.Equal(array.Skip(1), nonGeneric.Cast<T>().ToArray());
Collections\ImmutableListTestBase.cs (1)
524Assert.Equal(new[] { 1 }, enumerableNonGeneric.Cast<int>().ToList()); // exercises the enumerator
Collections\ImmutableSegmentedListBuilderTest.cs (1)
323Assert.Equal(new[] { 9, 8 }, list.Cast<int>().ToArray());
Collections\List\CollectionAsserts.cs (4)
81ILookup<object?, object?> e = expected.Cast<object?>().ToLookup(key => key); 82ILookup<object?, object?> a = actual!.Cast<object?>().ToLookup(key => key); 100ILookup<object?, object?> e = expected.Cast<object?>().ToLookup(key => key); 101ILookup<object?, object?> a = actual!.Cast<object?>().ToLookup(key => key);
Collections\SegmentedCollectionsMarshalTests.cs (2)
583test<int?>(Enumerable.Range(0, 17).Cast<int?>()); 655test<int?>(Enumerable.Range(0, 17).Cast<int?>());
Microsoft.CodeAnalysis.VisualBasic (6)
Syntax\SyntaxReplacer.vb (6)
311Return list.ReplaceRange(DirectCast(Me._originalNode, TNode), Me._replacementNodes.Cast(Of TNode)) 313Return list.InsertRange(index, Me._replacementNodes.Cast(Of TNode)) 315Return list.InsertRange(index + 1, Me._replacementNodes.Cast(Of TNode)) 328Return list.ReplaceRange(DirectCast(Me._originalNode, TNode), Me._replacementNodes.Cast(Of TNode)) 330Return list.InsertRange(index, Me._replacementNodes.Cast(Of TNode)) 332Return list.InsertRange(index + 1, Me._replacementNodes.Cast(Of TNode))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\VisualBasicParseOptionsTests.vb (1)
85Cast(Of LanguageVersion).
Microsoft.CodeAnalysis.Workspaces (14)
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
49result.AddRange(enumerable.Cast<ISymbol>());
Log\FunctionIdExtensions.cs (1)
14() => Enum.GetValues(typeof(FunctionId)).Cast<FunctionId>().ToImmutableDictionary(f => f, f => f.ToString()));
Shared\Extensions\ISymbolExtensions.cs (1)
622return xpathResult?.Cast<XNode>().ToArray();
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
241return _singletonListeners.Values.Cast<IAsynchronousOperationWaiter>();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
214return source.Cast<T?>().FirstOrDefault(); 230return source.Cast<T?>().FirstOrDefault(static (v, predicate) => predicate(v!.Value), predicate); 246return source.Cast<T?>().FirstOrDefault(static (v, arg) => arg.predicate(v!.Value, arg.arg), (predicate, arg)); 257return source.Cast<T?>().LastOrDefault(); 268return source.Cast<T?>().SingleOrDefault(v => predicate(v!.Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ControlFlowGraphExtensions.cs (1)
32=> cfg.DescendantOperations().Where(d => d?.Kind == operationKind).Cast<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedNamedTypeSymbol.cs (1)
90return [.. _constructedFrom.TypeMembers.Cast<INamedTypeSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
166=> [.. this.TypeMembers.Cast<INamedTypeSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
138return [.. newTypeParameters.Cast<ITypeParameterSymbol>()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
128FirstStatementAffectedInInnermostBlock = InnermostBlockStatements.Cast<TStatementSyntax>().FirstOrDefault(allAffectedStatements.Contains);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
214return source.Cast<T?>().FirstOrDefault(); 230return source.Cast<T?>().FirstOrDefault(static (v, predicate) => predicate(v!.Value), predicate); 246return source.Cast<T?>().FirstOrDefault(static (v, arg) => arg.predicate(v!.Value, arg.arg), (predicate, arg)); 257return source.Cast<T?>().LastOrDefault(); 268return source.Cast<T?>().SingleOrDefault(v => predicate(v!.Value));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Options\NamingStylePreferencesTests.cs (1)
202var enumNamesAndValues = type.GetEnumNames().Zip(type.GetEnumValues().Cast<object>(), (name, value) => (name, value));
Microsoft.Data.Analysis.Tests (3)
ArrowIntegrationTests.cs (1)
123StructArray structArray = new StructArray(structType, originalBatch.Length, originalBatch.Arrays.Cast<Apache.Arrow.Array>(), validityBitmap);
DataFrame.IOTests.cs (2)
1248var resColumns = table.Columns.Cast<DataColumn>().Select(column => (column.ColumnName, column.DataType)).ToArray(); 1251var resVals = table.Rows.Cast<DataRow>().Select(row => row.ItemArray).ToArray();
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateResxSource.cs (1)
506var arguments = match.Cast<Match>()
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
245string propertyCategory = e.Properties?.Cast<DictionaryEntry>().LastOrDefault(p => p.Key.ToString().Equals(s_TelemetryMarker)).Value?.ToString();
Microsoft.DotNet.Build.Tasks.Packaging (1)
GetPackageDestination.cs (1)
116if (packageTargetFramework.MetadataNames.Cast<string>().Any(md => md.Equals("TargetRuntime")))
Microsoft.DotNet.Helix.Sdk (1)
CheckAzurePipelinesTestResults.cs (1)
119IEnumerable<JObject> entries = data.Value<JArray>("value").Cast<JObject>();
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
187DateTimeOffset[] createdAts = Regex.Matches(Output, @"2024.*?Z").Cast<Match>().Select(m => DateTimeOffset.Parse(m.Value)).ToArray();
Microsoft.Extensions.Caching.SqlServer (1)
DatabaseOperations.cs (1)
366return ex.Errors.Cast<SqlError>().Any(error => error.Number == DuplicateKeyErrorId);
Microsoft.Extensions.DependencyModel (3)
DependencyContextJsonReader.cs (2)
209CreateLibraries(compileTarget?.Libraries, false, libraryStubs).Cast<CompilationLibrary>().ToArray(), 210CreateLibraries(runtimeTarget.Libraries, true, libraryStubs).Cast<RuntimeLibrary>().ToArray(),
DependencyContextWriter.cs (1)
408context.RuntimeLibraries.Cast<Library>().Concat(context.CompileLibraries)
Microsoft.Gen.Logging (3)
Parsing\Parser.LogProperties.cs (1)
123foreach (var property in members.Where(m => m.Kind == SymbolKind.Property).Cast<IPropertySymbol>())
Parsing\Parser.TagProvider.cs (1)
88var methodSymbols = providerType.GetMembers(providerMethodName).Where(m => m.Kind == SymbolKind.Method).Cast<IMethodSymbol>();
Parsing\TypeSymbolExtensions.cs (1)
82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSMarshalAsAttributeInfoParser.cs (1)
35foreach (var ta in jsTypeArgs.TypeArguments.Cast<INamedTypeSymbol>().Select(x => x.ToDisplayString()))
Microsoft.Interop.SourceGeneration (1)
GeneratedStatements.cs (1)
35Pin = GenerateStatementsForStubContext(marshallers, context with { CurrentStage = StubIdentifierContext.Stage.Pin }).Cast<FixedStatementSyntax>().ToImmutableArray(),
Microsoft.Maui.Controls (12)
LegacyLayouts\RelativeLayout.cs (2)
71 foreach (View child in Children.Cast<View>()) 76 List<View> unsolvedChildren = Children.Cast<View>().ToList();
ListView\ListView.cs (2)
528 ItemTapped?.Invoke(this, new ItemTappedEventArgs(ItemsSource.Cast<object>().ElementAt(groupIndex), cell?.BindingContext, TemplatedItems.GetGlobalIndexOfItem(cell?.BindingContext))); 559 var itemSource = ItemsSource?.Cast<object>().ToList();
MultiPage.cs (2)
351 if (selected == null || !ItemsSource.Cast<object>().Contains(selected)) 353 SelectedItem = ItemsSource.Cast<object>().FirstOrDefault();
NavigationPage\NavigationPage.cs (1)
132 IEnumerable<Page> INavigationPageController.Pages => InternalChildren.Cast<Page>();
Shell\ShellElementCollection.cs (2)
110 var list = Inner.Cast<BaseShellItem>().ToList(); 330 return Inner.Cast<BaseShellItem>().GetEnumerator();
TableView\TableSection.cs (1)
159 IReadOnlyList<Maui.IVisualTreeElement> IVisualTreeElement.GetVisualChildren() => this._children.Cast<IVisualTreeElement>().ToList().AsReadOnly();
TableView\TableView.cs (1)
161 childCollectionChangedEventArgs.Args.NewItems?.Cast<Cell>().ForEach(cell => cell.Parent = this);
TemplatedItemsList.cs (1)
1305 newList.AddRange(list.Cast<TemplatedItemsList<TView, TItem>>().Select(tl => tl.ShortName));
Microsoft.Maui.Controls.Maps (3)
HandlerImpl\Map.Impl.cs (2)
10 IList<IMapElement> IMap.Elements => _mapElements.Cast<IMapElement>().ToList(); 12 IList<IMapPin> IMap.Pins => _pins.Cast<IMapPin>().ToList();
Map.cs (1)
229 if (e.NewItems is not null && e.NewItems.Cast<Pin>().Any(pin => pin.Label is null))
Microsoft.ML.AutoML (1)
TrainerExtensions\TrainerExtensionUtil.cs (1)
282var enumDict = fi.FieldType.GetEnumValues().Cast<int>()
Microsoft.ML.AutoML.Tests (7)
EstimatorExtensionTests.cs (1)
32var estimatorNames = Enum.GetValues(typeof(EstimatorName)).Cast<EstimatorName>();
TrainerExtensionsTests.cs (6)
27var trainerNames = Enum.GetValues(typeof(TrainerName)).Cast<TrainerName>() 357var publicNames = Enum.GetValues(typeof(BinaryClassificationTrainer)).Cast<BinaryClassificationTrainer>(); 365var publicNames = Enum.GetValues(typeof(MulticlassClassificationTrainer)).Cast<MulticlassClassificationTrainer>(); 373var publicNames = Enum.GetValues(typeof(RegressionTrainer)).Cast<RegressionTrainer>(); 381var publicNames = Enum.GetValues(typeof(RecommendationTrainer)).Cast<RecommendationTrainer>(); 389var publicNames = Enum.GetValues(typeof(RankingTrainer)).Cast<RankingTrainer>();
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
82return sampleData.Cast<DictionaryEntry>().ToDictionary(k => (string)k.Key, v => (string)v.Value);
Microsoft.ML.Data (3)
Commands\TypeInfoCommand.cs (1)
87var kinds = Enum.GetValues(typeof(InternalDataKind)).Cast<InternalDataKind>().Distinct().OrderBy(k => k).ToArray();
Transforms\ValueMapping.cs (2)
971return _mapping.Keys.Cast<T>().ToArray(); 975return _mapping.Values.Cast<T>().ToArray();
Microsoft.ML.Fairlearn (1)
Reductions\Utilities.cs (1)
20var sensitiveFeatureColumnValue = moment.SensitiveFeatureColumn.Cast<string>().Distinct();
Microsoft.ML.Predictor.Tests (1)
CmdLine\CmdLine.cs (1)
241foreach (var sc in subComponents.Cast<ICommandLineComponentFactory>())
Microsoft.ML.StandardTrainers (1)
Standard\MulticlassClassification\OneVersusAllTrainer.cs (1)
273internal ImmutableArray<object> SubModelParameters => _impl.Predictors.Cast<object>().ToImmutableArray();
Microsoft.ML.Sweeper (4)
Algorithms\KdoSweeper.cs (4)
138var viableRuns = prevRuns.Cast<RunResult>().Where(run => run != null && run.HasMetricValue).Cast<IRunResult>().ToArray(); 379previousRuns.Cast<RunResult>().Where(r => r.HasMetricValue).Max(r => r.MetricValue) : 380previousRuns.Cast<RunResult>().Where(r => r.HasMetricValue).Min(r => r.MetricValue);
Microsoft.ML.Transforms (3)
Dracula\CountTableTransformer.cs (1)
91: this(env, labelColumnName, columns.Cast<ColumnOptionsBase>().ToArray())
Text\StopWordsRemovingTransformer.cs (2)
149var values = Enum.GetValues(typeof(StopWordsRemovingEstimator.Language)).Cast<int>(); 171var langsDictionary = Enum.GetValues(typeof(StopWordsRemovingEstimator.Language)).Cast<StopWordsRemovingEstimator.Language>()
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeViewItemBase.cs (1)
125foreach (var item in items.Cast<TreeViewItemBase>())
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
CodeModel\FileCodeClassTests.cs (2)
65Assert.Equal(1, bases.Cast<CodeElement>().Count()); 84Assert.Equal(2, interfaces.Cast<CodeElement>().Count());
NativeIISSample (1)
Startup.cs (1)
73foreach (var key in vars.Keys.Cast<string>().OrderBy(key => key, StringComparer.OrdinalIgnoreCase))
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Roslyn.VisualStudio.DiagnosticsWindow (2)
OptionPages\PerformanceLoggersPage.cs (1)
70var functionIds = Enum.GetValues(typeof(FunctionId)).Cast<FunctionId>().Where(isEnabled).ToImmutableArray();
VenusMargin\ProjectionBufferMargin.xaml.cs (1)
32TextView.Properties[ProjectionSpanTaggerProvider.PropertyName] = new List<Span>(e.AddedItems.Cast<SnapshotSpan>().Select(ss => ss.Span).Where(ss => !ss.IsEmpty));
Roslyn.VisualStudio.Next.UnitTests (1)
UnifiedSettings\UnifiedSettingsTests.cs (1)
362var expectedEnumValues = enumValues ?? [.. Enum.GetValues(nonNullableType).Cast<T>()];
System.ComponentModel.Composition (1)
Microsoft\Internal\GenerationServices.cs (1)
237ilGenerator.LoadInt(enumerable.Cast<object>().Count());
System.Composition.Runtime (2)
System\Composition\Hosting\Core\CompositionContract.cs (2)
201if (secondEnumerable == null || !Enumerable.SequenceEqual(firstEnumerable.Cast<object>(), secondEnumerable.Cast<object>()))
System.Data.Common (5)
System\Data\EnumerableRowCollection.cs (1)
93_enumerableRows = table.Rows.Cast<TRow>();
System\Data\EnumerableRowCollectionExtensions.cs (1)
155IEnumerable<TResult> typedEnumerable = Enumerable.Cast<TResult>(source);
System\Data\TypedTableBase.cs (1)
48return Rows.Cast<T>().GetEnumerator();
System\Data\TypeLimiter.cs (2)
110? dataTable.Columns.Cast<DataColumn>().Select(column => column.DataType) 121? dataSet.Tables.Cast<DataTable>().SelectMany(GetPreviouslyDeclaredDataTypes)
System.Drawing.Common.Tests (2)
Design\CategoryNameCollectionTests.cs (2)
13Assert.Equal(value, collection.Cast<string>()); 23Assert.Equal(value, collection.Cast<string>());
System.Private.Windows.Core.TestUtilities (1)
XUnit\ReadOnlyTheoryData.cs (1)
23=> _data = data.Cast<object>().Select(i => new object?[] { i }).ToArray();
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (2)
156AppendHashtableContents(writer, rm.Tree.CaptureNumberSparseMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as int?)); 162AppendHashtableContents(writer, rm.Tree.CaptureNameToNumberMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as string, StringComparer.Ordinal));
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3936ToolStripItem[] itemsArray = [..items.Cast<ToolStripItem>()];
System.Windows.Forms.Design (7)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
810List<ListItem> toBeDeleted = [.._listBox.SelectedItems.Cast<ListItem>()];
System\ComponentModel\Design\ExceptionCollection.cs (1)
25_exceptions = exceptions?.Cast<Exception>().ToList();
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
260List<IComponent> dragComps = [..e.DragComponents.Cast<IComponent>()]; 415List<IComponent> selComps = [.._selectionService.GetSelectedComponents().Cast<IComponent>()];
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
169_styles = [..((TableLayoutStyleCollection)_changedProp.GetValue(_table)).Cast<TableLayoutStyle>()];
System\Windows\Forms\Design\CommandSet.cs (1)
807List<IComponent> selComps = [..SelectionService.GetSelectedComponents().Cast<IComponent>()];
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
148components.AddRange(panel.Controls.Cast<Control>());
System.Windows.Forms.Design.Tests (82)
CodeDomHelpers.cs (1)
72string parameters = string.Join(", ", coce.Parameters.Cast<CodeObject>().Select(GetConstructionString));
EnsureEditorsTests.cs (1)
174IEnumerable<EditorAttribute> attributes = method.GetCustomAttributes(typeof(EditorAttribute), false).Cast<EditorAttribute>();
System\ComponentModel\Design\DesignerActionItemCollectionTests.cs (2)
31Assert.Equal(new object[] { value1, value2 }, collection.Cast<object>()); 57Assert.Equal(new object[] { value2, value1 }, collection.Cast<object>());
System\ComponentModel\Design\DesignerActionListCollectionTests.cs (9)
28Assert.Equal(value, collection.Cast<object>()); 51Assert.Equal(new object[] { value1, value2 }, collection.Cast<object>()); 56Assert.Equal(new object[] { value1, value2, null }, collection.Cast<object>()); 67Assert.Equal(value, collection.Cast<object>()); 71Assert.Equal(value.Concat(value), collection.Cast<object>()); 80Assert.Equal(value, collection.Cast<object>()); 84Assert.Equal(value.Concat(value), collection.Cast<object>()); 109Assert.Equal(new object[] { value2, value1 }, collection.Cast<object>()); 114Assert.Equal(new object[] { value2, null, value1 }, collection.Cast<object>());
System\ComponentModel\Design\DesignerHostTests.cs (6)
293Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 304Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 315Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>()); 348Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 359Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 370Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>());
System\ComponentModel\Design\DesignerVerbCollectionTests.cs (9)
28Assert.Equal(value, collection.Cast<object>()); 51Assert.Equal(new object[] { value1, value2 }, collection.Cast<object>()); 56Assert.Equal(new object[] { value1, value2, null }, collection.Cast<object>()); 67Assert.Equal(value, collection.Cast<object>()); 71Assert.Equal(value.Concat(value), collection.Cast<object>()); 80Assert.Equal(value, collection.Cast<object>()); 84Assert.Equal(value.Concat(value), collection.Cast<object>()); 109Assert.Equal(new object[] { value2, value1 }, collection.Cast<object>()); 114Assert.Equal(new object[] { value2, null, value1 }, collection.Cast<object>());
System\ComponentModel\Design\SiteNestedContainerTests.cs (8)
91Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 101Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 195Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 206Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 217Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>()); 252Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 263Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 274Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>());
System\Drawing\Design\ToolboxItemTests.cs (3)
1370Assert.Equal(new string[] { type.Name, "Filter", "System.Drawing.Design.Tests.ToolboxItemTests+" + type.Name }, item.Filter.Cast<ToolboxItemFilterAttribute>().Select(a => a.FilterString).OrderBy(f => f)); 1378Assert.Equal(new string[] { type.Name, "Filter", "System.Drawing.Design.Tests.ToolboxItemTests+" + type.Name }, item.Filter.Cast<ToolboxItemFilterAttribute>().Select(a => a.FilterString).OrderBy(f => f)); 1407Assert.Equal(new string[] { "System.Object" }, item.Filter.Cast<ToolboxItemFilterAttribute>().Select(a => a.FilterString));
System\Windows\Forms\Design\ContextMenuStripActionListTests.cs (3)
111var items = _actionList.GetSortedActionItems().Cast<DesignerActionPropertyItem>().ToList(); 126var items = _actionList.GetSortedActionItems().Cast<DesignerActionPropertyItem>().ToList(); 145var items = _actionList.GetSortedActionItems().Cast<DesignerActionPropertyItem>().ToList();
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (2)
62_control.Controls.Cast<Control>().Should().Contain(control); 72_control.Controls.Cast<Control>().Should().Contain(controls);
System\Windows\Forms\Design\DesignerFrameTests.cs (5)
47designerFrame.Controls.Cast<Control>().Should().HaveCount(1); 64List<Control> controls = designerFrame.Controls.Cast<Control>().ToList(); 69Control? containedControl = designerRegion?.Controls.Cast<Control>().FirstOrDefault(); 75designerFrame.Controls.Cast<Control>().Should().NotContain(control); 125designerFrame.Controls.Cast<Control>().Should().Contain(control);
System\Windows\Forms\Design\ImageListDesignerTests.cs (1)
16imageListDesigner.ActionLists.Cast<object>().Should().HaveCount(1);
System\Windows\Forms\Design\ListViewActionListTests.cs (1)
66var enumerableItems = items.Cast<DesignerActionItem>();
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
34IList<SnapLine> snapLines = _designer.SnapLines.Cast<SnapLine>().ToList();
System\Windows\Forms\Design\TabControlDesignerTests.cs (3)
84var verbs = designer.Verbs.Cast<DesignerVerb>(); 102var removeVerb = verbs.Cast<DesignerVerb>().FirstOrDefault(v => v.Text == SR.TabControlRemove); 118var removeVerb = verbs.Cast<DesignerVerb>().FirstOrDefault(v => v.Text == SR.TabControlRemove);
System\Windows\Forms\Design\TableLayoutPanelDesignerTests.cs (3)
65List<DesignerVerb> verbs = _designer.Verbs.Cast<DesignerVerb>().ToList(); 85List<DesignerVerb> verbs = _designer.Verbs.Cast<DesignerVerb>().ToList(); 94verbs = _designer.Verbs.Cast<DesignerVerb>().ToList();
System\Windows\Forms\Design\TextBoxBaseDesignerTests.cs (1)
55SnapLine? baselineSnapLine = snapLines.Cast<SnapLine>().FirstOrDefault(sl => sl.SnapLineType == SnapLineType.Baseline);
System\Windows\Forms\Design\ToolStripActionListTests.cs (1)
164List<DesignerActionItem> itemList = items.Cast<DesignerActionItem>().ToList();
System\Windows\Forms\Design\ToolStripAdornerWindowServiceTests.cs (1)
72_behaviorService.Adorners.Cast<Adorner>().Should().NotContain(_service.DropDownAdorner);
System\Windows\Forms\Design\ToolStripContainerActionListTests.cs (10)
47rootComponent.Controls.Cast<Control>().Should().Contain(_toolStripContainer); 66_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().Contain(childControl1); 67_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().Contain(childControl2); 68rootComponent.Controls.Cast<Control>().Should().NotContain(childControl1); 69rootComponent.Controls.Cast<Control>().Should().NotContain(childControl2); 87rootComponent.Controls.Cast<Control>().Should().Contain(inheritedControl); 88_toolStripContainer.ContentPanel.Controls.Cast<Control>().Should().NotContain(inheritedControl); 155List<string> displayNames = items.Cast<DesignerActionItem>() 176List<string> displayNames = items.Cast<DesignerActionItem>() 201List<string> displayNames = items.Cast<DesignerActionItem>()
System\Windows\Forms\Design\ToolStripContentPanelDesignerTests.cs (2)
29IList<SnapLine> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<SnapLine>().ToList(); 39List<SnapLine> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<SnapLine>().ToList();
System\Windows\Forms\Design\ToolStripCustomTypeDescriptorTests.cs (4)
54_descriptor.GetProperties().Cast<PropertyDescriptor>().Should().NotContain(p => p.Name == "Items"); 61_descriptor.GetProperties(attributes).Cast<PropertyDescriptor>().Should().NotContain(p => p.Name == "Items"); 68_descriptor.GetProperties().Cast<PropertyDescriptor>().Should().NotContain(p => p.Name == "Items"); 76_descriptor.GetProperties(attributes).Cast<PropertyDescriptor>().Should().NotContain(p => p.Name == "Items");
System\Windows\Forms\Design\WindowsFormsDesignerOptionServiceTests.cs (5)
38Assert.Equal(new string[] { "EnableInSituEditing", "GridSize", "ObjectBoundSmartTagAutoShow", "ShowGrid", "SnapToGrid", "UseOptimizedCodeGeneration", "UseSmartTags", "UseSnapLines" }, childCollection.Properties.Sort().Cast<PropertyDescriptor>().Select(p => p.Name)); 62Assert.Equal(new string[] { "EnableInSituEditing", "GridSize", "ObjectBoundSmartTagAutoShow", "ShowGrid", "SnapToGrid", "UseOptimizedCodeGeneration", "UseSmartTags", "UseSnapLines" }, childCollection.Properties.Sort().Cast<PropertyDescriptor>().Select(p => p.Name)); 79Assert.Equal(new string[] { "EnableInSituEditing", "GridSize", "ObjectBoundSmartTagAutoShow", "ShowGrid", "SnapToGrid", "UseOptimizedCodeGeneration", "UseSmartTags", "UseSnapLines" }, childCollection.Properties.Sort().Cast<PropertyDescriptor>().Select(p => p.Name)); 86Assert.Equal(new string[] { "EnableInSituEditing", "GridSize", "ObjectBoundSmartTagAutoShow", "ShowGrid", "SnapToGrid", "UseOptimizedCodeGeneration", "UseSmartTags", "UseSnapLines" }, childCollection.Properties.Sort().Cast<PropertyDescriptor>().Select(p => p.Name)); 102Assert.Equal(new string[] { "EnableInSituEditing", "GridSize", "ObjectBoundSmartTagAutoShow", "ShowGrid", "SnapToGrid", "UseOptimizedCodeGeneration", "UseSmartTags", "UseSnapLines" }, childCollection.Properties.Sort().Cast<PropertyDescriptor>().Select(p => p.Name));
System.Windows.Forms.Tests (1618)
CheckedListBoxTests.cs (4)
287Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 292Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 339Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 347Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>());
System\Windows\Forms\AxWebBrowserTests.cs (2)
42.Cast<PropertyDescriptor>() 48.Cast<EventDescriptor>()
System\Windows\Forms\ColumnHeaderCollectionTests.cs (14)
170using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 191using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 213using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 236using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 258using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 281using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 306using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 723using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 735using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 748using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 762using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 775using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 789using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>()); 805using ColumnHeader header = Assert.Single(collection.Cast<ColumnHeader>());
System\Windows\Forms\ComboBox.ComboBoxChildListUiaProviderTests.cs (1)
104comboBox.Items.AddRange(Enumerable.Range(0, 11).Cast<object>().ToArray());
System\Windows\Forms\ControlTests.ControlCollection.cs (64)
44Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 69Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 84Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 99Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 119Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 145Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 150Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 161Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 166Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 176Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 197Assert.Same(collection2.Cast<Control>().Last(), e.AffectedControl); 233Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 291Assert.Equal(new Control[] { control1 }, collection.Cast<Control>()); 301Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 315Assert.Equal(new Control[] { control1, control2, control3 }, collection.Cast<Control>()); 1232Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1246Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1259Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1358Assert.Equal(new Control[] { child1, child2, child3 }, sourceCollection.Cast<Control>()); 1359Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 1940Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1950Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 1960Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2004Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2015Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2026Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2074Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2087Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2100Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2156Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2172Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2188Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 2223Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2224Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2230Assert.Equal(new Control[] { control1 }, collection1.Cast<Control>()); 2231Assert.Equal(new Control[] { control2 }, collection2.Cast<Control>()); 2874Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 2885Assert.Empty(collection.Cast<Control>()); 2968Assert.Equal(new Control[] { child1, child3 }, collection.Cast<Control>()); 2981Assert.Equal(new Control[] { child1 }, collection.Cast<Control>()); 3027Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3031Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3065Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3075Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3085Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3133Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3143Assert.Equal(new Control[] { child2, child3, child1 }, collection.Cast<Control>()); 3193Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3206Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3219Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3278Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3294Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3310Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3367Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3380Assert.Equal(new Control[] { child2, child1, child3 }, collection.Cast<Control>()); 3393Assert.Equal(new Control[] { child1, child2, child3 }, collection.Cast<Control>()); 3442Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 3469Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 3474Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 3485Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 3490Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 3541Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3551Assert.Equal(new Control[] { child2 }, collection.Cast<Control>()); 3561Assert.Equal(new Control[] { child2 }, collection.Cast<Control>());
System\Windows\Forms\ControlTests.Methods.cs (26)
141Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 156Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 165Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 183Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 205Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 217Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 238Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 266Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 281Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 305Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 328Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 340Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 1551Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1572Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 6995Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7010Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7019Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7037Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7059Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7071Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7092Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7120Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7135Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7159Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7182Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7194Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>());
System\Windows\Forms\CursorConverterTests.cs (1)
196ICollection<Cursor> values = converter.GetStandardValues().Cast<Cursor>().ToArray();
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (13)
47Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 55Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 75Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 83Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 125Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 133Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 199Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 207Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 233Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 241Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 275Assert.Equal(new DataGridViewColumn[] { column1 }, collection.Cast<DataGridViewColumn>()); 283Assert.Equal(new DataGridViewColumn[] { column1, column2 }, collection.Cast<DataGridViewColumn>()); 294Assert.Equal(new DataGridViewColumn[] { column1, column2, column3 }, collection.Cast<DataGridViewColumn>());
System\Windows\Forms\DataGridViewRowTests.cs (5)
3026Assert.Equal(new DataGridViewRow[] { row2, row1 }, control.SelectedRows.Cast<DataGridViewRow>()); 4076Assert.Null(Assert.Single(row.Cells.Cast<DataGridViewCell>()).Value); 4106Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<DataGridViewCell>()).Value); 5690Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<DataGridViewCell>()).Value); 5706Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<DataGridViewCell>()).Value);
System\Windows\Forms\DataObjectTests.cs (8)
717dataObject.GetFileDropList().Cast<string>().Should().BeEmpty(); 737dataObject.GetFileDropList().Cast<string>().Should().BeEquivalentTo(expected); 752mockDataObject.Object.GetFileDropList().Cast<string>().Should().BeEquivalentTo(expected); 760dataObject.GetFormats().Cast<string>().Should().BeEmpty(); 1614dataObject.GetData(DataFormats.FileDrop, autoConvert: true).Should().BeEquivalentTo(filePaths.Cast<string>()); 1615dataObject.GetData(DataFormats.FileDrop, autoConvert: false).Should().BeEquivalentTo(filePaths.Cast<string>()); 1616dataObject.GetData("FileName", autoConvert: true).Should().BeEquivalentTo(filePaths.Cast<string>()); 1618dataObject.GetData("FileNameW", autoConvert: true).Should().BeEquivalentTo(filePaths.Cast<string>());
System\Windows\Forms\DomainUpDownTests.cs (12)
669_sub.Items.Cast<string>().Should().Equal(expectedItems); 676_sub.Items.Cast<string>().Should().Equal(expectedItems); 684_sub.Items.Cast<string>().Should().Equal(["a", "a", "B", "c", "d"]); 712_sub.Items.Cast<string>().Should().Equal(expectedItems); 719_sub.Items.Cast<string>().Should().Equal(expectedItems); 727_sub.Items.Cast<string>().Should().Equal(["a", "a", "B", "c", "d"]); 799_sub.Items.Cast<string>().Should().Equal(expectedItems); 809_sub.Items.Cast<string>().Should().Equal(expectedItems); 820_sub.Items.Cast<string>().Should().Equal(["a", "a", "B", "c", "d"]); 850_sub.Items.Cast<string>().Should().Equal(expectedItems); 860_sub.Items.Cast<string>().Should().Equal(expectedItems); 871_sub.Items.Cast<string>().Should().Equal(["a", "a", "B", "c", "d"]);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (32)
457Assert.Equal(new string[] { "Key1", "Key2" }, collection.Keys.Cast<string>()); 463Assert.Equal(new string[] { "Key1", "Key2", "Key1" }, collection.Keys.Cast<string>()); 470Assert.Equal(new string[] { "Key1", "Key2", "Key1", "" }, collection.Keys.Cast<string>()); 477Assert.Equal(new string[] { "Key1", "Key2", "Key1", string.Empty, string.Empty }, collection.Keys.Cast<string>()); 502Assert.Equal(new string[] { "Key1", "Key2" }, collection.Keys.Cast<string>()); 508Assert.Equal(new string[] { "Key1", "Key2", "Key1" }, collection.Keys.Cast<string>()); 515Assert.Equal(new string[] { "Key1", "Key2", "Key1", "" }, collection.Keys.Cast<string>()); 522Assert.Equal(new string[] { "Key1", "Key2", "Key1", string.Empty, string.Empty }, collection.Keys.Cast<string>()); 546Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 571Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 615Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 640Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 672Assert.Equal(new string[] { "Key1", "Key2" }, collection.Keys.Cast<string>()); 678Assert.Equal(new string[] { "Key1", "Key2", "Key1" }, collection.Keys.Cast<string>()); 685Assert.Equal(new string[] { "Key1", "Key2", "Key1", "" }, collection.Keys.Cast<string>()); 692Assert.Equal(new string[] { "Key1", "Key2", "Key1", string.Empty, string.Empty }, collection.Keys.Cast<string>()); 717Assert.Equal(new string[] { "Key1", "Key2" }, collection.Keys.Cast<string>()); 723Assert.Equal(new string[] { "Key1", "Key2", "Key1" }, collection.Keys.Cast<string>()); 730Assert.Equal(new string[] { "Key1", "Key2", "Key1", "" }, collection.Keys.Cast<string>()); 737Assert.Equal(new string[] { "Key1", "Key2", "Key1", string.Empty, string.Empty }, collection.Keys.Cast<string>()); 761Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 786Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 827Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 834Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 852Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 859Assert.Equal(new string[] { string.Empty, string.Empty }, collection.Keys.Cast<string>()); 916Assert.Equal(Enumerable.Repeat(string.Empty, expectedCount), collection.Keys.Cast<string>()); 934Assert.Equal(Enumerable.Repeat(string.Empty, expectedCount), collection.Keys.Cast<string>()); 1552Assert.Equal(expectedKeys, collection.Keys.Cast<string>()); 1557Assert.Equal(expectedKeys, collection.Keys.Cast<string>()); 1574Assert.Equal(expectedKeys, collection.Keys.Cast<string>()); 1579Assert.Equal(expectedKeys, collection.Keys.Cast<string>());
System\Windows\Forms\InputLanguageTests.cs (1)
21Assert.All(collection.Cast<InputLanguage>(), VerifyInputLanguage);
System\Windows\Forms\ListBindingHelperTests.cs (55)
293IEnumerable<PropertyDescriptor> properties = ListBindingHelper.GetListItemProperties(list)?.Cast<PropertyDescriptor>(); 297properties = ListBindingHelper.GetListItemProperties(list, null)?.Cast<PropertyDescriptor>(); 301properties = ListBindingHelper.GetListItemProperties(list, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 305properties = ListBindingHelper.GetListItemProperties(list, null, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 309properties = ListBindingHelper.GetListItemProperties(list, string.Empty, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 315yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 317yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 318yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 320yield return new object[] { new ListDataClass(), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 321yield return new object[] { new ListDataClass() { ListProperty = [new()] }, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 322yield return new object[] { typeof(ListDataClass), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 324yield return new object[] { new MultiListDataClass(), TypeDescriptor.GetProperties(typeof(MultiListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "ListProperty" } }; 325yield return new object[] { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] }, TypeDescriptor.GetProperties(typeof(MultiListDataClass)).Cast<PropertyDescriptor>().Take(0).ToArray(), new string[] { "ParentListProperty" } }; 329yield return new object[] { typeof(MultiListDataClass), TypeDescriptor.GetProperties(typeof(MultiListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "ListProperty" } }; 331yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 336PropertyDescriptor[] descriptors = TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(); 366yield return new object[] { new EnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 367yield return new object[] { new List<EnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 368yield return new object[] { new ArrayList { new EnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 369yield return new object[] { new IEnumerableWrapper(new object[] { new EnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 374yield return new object[] { new NonEnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 375yield return new object[] { new List<NonEnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 376yield return new object[] { new ArrayList { new NonEnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 377yield return new object[] { new IEnumerableWrapper(new object[] { new NonEnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 381yield return new object[] { new ITypedListDataClass(), TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 382yield return new object[] { typedListDataClass, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 383yield return new object[] { typeof(ITypedListDataClass), TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 384yield return new object[] { new ITypedListDataClass[] { new() }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 385yield return new object[] { new ITypedListDataClass[] { typedListDataClass }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 386yield return new object[] { new List<ITypedListDataClass> { new() }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 387yield return new object[] { new List<ITypedListDataClass> { typedListDataClass }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 388yield return new object[] { new ArrayList { new ITypedListDataClass() }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 389yield return new object[] { new ArrayList { typedListDataClass }, TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 390yield return new object[] { new IEnumerableWrapper(new object[] { new ITypedListDataClass() }), TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 391yield return new object[] { new IEnumerableWrapper(new object[] { typedListDataClass }), TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 392yield return new object[] { typeof(ITypedListDataClass[]), TypeDescriptor.GetProperties(typeof(ITypedListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 395yield return new object[] { new ITypedListParent(), TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 396yield return new object[] { typedListParent, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 397yield return new object[] { new ITypedListParent[] { new() }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 398yield return new object[] { new ITypedListParent[] { typedListParent }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 399yield return new object[] { new List<ITypedListParent> { new() }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 400yield return new object[] { new List<ITypedListParent> { typedListParent }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 401yield return new object[] { new ArrayList { new ITypedListParent() }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 402yield return new object[] { new ArrayList { typedListParent }, TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 403yield return new object[] { new IEnumerableWrapper(new object[] { new ITypedListParent() }), TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "OtherProperty" } }; 404yield return new object[] { new IEnumerableWrapper(new object[] { typedListParent }), TypeDescriptor.GetProperties(typeof(ITypedListParent)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 411IEnumerable<PropertyDescriptor> properties = ListBindingHelper.GetListItemProperties(list, listAccessors)?.Cast<PropertyDescriptor>(); 415properties = ListBindingHelper.GetListItemProperties(list, null, listAccessors)?.Cast<PropertyDescriptor>(); 419properties = ListBindingHelper.GetListItemProperties(list, string.Empty, listAccessors)?.Cast<PropertyDescriptor>(); 427yield return new object[] { new MultiListDataClass(), "ParentListProperty", TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 430yield return new object[] { typeof(MultiListDataClass), "ParentListProperty", TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray(), new string[] { "Property" } }; 437IEnumerable<PropertyDescriptor> properties = ListBindingHelper.GetListItemProperties(list, dataMember, listAccessors)?.Cast<PropertyDescriptor>(); 458Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 459Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), null, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray())); 460Assert.Throws<TargetInvocationException>(() => ListBindingHelper.GetListItemProperties(new DataClass(), string.Empty, TypeDescriptor.GetProperties(typeof(ListDataClass)).Cast<PropertyDescriptor>().ToArray()));
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (156)
95Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 101Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 107Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 121Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 122Assert.Equal(new int[] { 4, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 127Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 128Assert.Equal(new int[] { 4, 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 133Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 134Assert.Equal(new int[] { 4, 1, 4 }, owner.CustomTabOffsets.Cast<int>()); 154Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 163Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 172Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 196Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 197Assert.Equal(new int[] { 4, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 205Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 206Assert.Equal(new int[] { 4, 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 214Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 215Assert.Equal(new int[] { 4, 1, 4 }, owner.CustomTabOffsets.Cast<int>()); 264Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 271Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 278Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 285Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 307Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 308Assert.Equal(new int[] { 2 }, owner.CustomTabOffsets.Cast<int>()); 314Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 315Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 321Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 322Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 328Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 329Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 357Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 367Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 377Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 387Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 419Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 420Assert.Equal(new int[] { 2 }, owner.CustomTabOffsets.Cast<int>()); 429Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 430Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 439Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 440Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 449Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 450Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 473Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 480Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 501Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 502Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 508Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 509Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 536Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 546Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 577Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 578Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 587Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 588Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 614Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 621Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 645Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 646Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 652Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 653Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 683Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 693Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 727Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 728Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 737Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 738Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 1111Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1118Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1155Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1156Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1162Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1163Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 1206Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1216Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1269Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1270Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1279Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1280Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 1325Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1332Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1362Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1363Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1369Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1370Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 1406Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1416Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1459Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 1460Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1469Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 1470Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 1568Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 1574Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 1580Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 1597Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 1598Assert.Equal(new int[] { 4, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 1603Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 1604Assert.Equal(new int[] { 4, 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1609Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 1610Assert.Equal(new int[] { 4, 1, 4 }, owner.CustomTabOffsets.Cast<int>()); 1635Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 1644Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 1653Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 1680Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 1681Assert.Equal(new int[] { 4, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 1689Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 1690Assert.Equal(new int[] { 4, 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 1698Assert.Equal(new int[] { 4, 1, 4 }, collection.Cast<int>()); 1699Assert.Equal(new int[] { 4, 1, 4 }, owner.CustomTabOffsets.Cast<int>()); 1762Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 1769Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1776Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1783Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 1805Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 1806Assert.Equal(new int[] { 2 }, owner.CustomTabOffsets.Cast<int>()); 1812Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1813Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 1819Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1820Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 1826Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 1827Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 1855Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 1865Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1875Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1885Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 1917Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 1918Assert.Equal(new int[] { 2 }, owner.CustomTabOffsets.Cast<int>()); 1927Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1928Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 1937Assert.Equal(new int[] { 1, 2 }, collection.Cast<int>()); 1938Assert.Equal(new int[] { 1, 2 }, owner.CustomTabOffsets.Cast<int>()); 1947Assert.Equal(new int[] { 1, 2, 3 }, collection.Cast<int>()); 1948Assert.Equal(new int[] { 1, 2, 3 }, owner.CustomTabOffsets.Cast<int>()); 2348Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2355Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2395Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2396Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 2402Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2403Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 2451Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2461Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2517Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2518Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 2527Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2528Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 2588Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2595Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2628Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2629Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 2635Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2636Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>()); 2677Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2687Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2733Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 2734Assert.Equal(new int[] { 1, 3 }, owner.CustomTabOffsets.Cast<int>()); 2743Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 2744Assert.Equal(new int[] { 1 }, owner.CustomTabOffsets.Cast<int>());
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (988)
29Assert.Equal(new object[] { 3, 2, 1 }, collection.Cast<object>()); 42Assert.Equal(new object[] { 3, 2, 1 }, collection.Cast<object>()); 171Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 178Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 185Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 192Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 212Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 219Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 226Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 233Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 250Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 251Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 257Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 258Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 264Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 265Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 271Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 272Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 291Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 292Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 298Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 299Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 305Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 306Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 312Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 313Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 514Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 515Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 531Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 532Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 548Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 549Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 565Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 566Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 603Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 604Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 620Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 621Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 637Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 638Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 654Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 655Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 685Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 686Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 693Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 694Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 701Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 702Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 709Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 710Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 734Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 735Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 742Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 743Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 750Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 751Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 758Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 759Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 787Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 788Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 795Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 796Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 803Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 804Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 811Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 812Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 819Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 820Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 827Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 828Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 857Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 858Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 865Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 866Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 873Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 874Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 881Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 882Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 889Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 890Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 897Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 898Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 931Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 932Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 942Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 943Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 953Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 954Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 964Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 965Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1004Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1005Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1015Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1016Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1026Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1027Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1037Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1038Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1081Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1082Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1092Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1093Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1103Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 1104Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1114Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 1115Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1125Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1126Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1136Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1137Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1181Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1182Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1192Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1193Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1203Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 1204Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1214Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 1215Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1225Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1226Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1236Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 1237Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1309Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1317Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 1325Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 1333Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 1350Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1351Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 1358Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 1359Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 1366Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 1367Assert.Equal(new object[] { 2, 1, 1 }, owner.Items.Cast<object>()); 1374Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 1375Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 1394Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1402Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 1410Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 1418Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 1438Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1439Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 1446Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 1447Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 1454Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 1455Assert.Equal(new object[] { 1, 1, 2 }, owner.Items.Cast<object>()); 1462Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 1463Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 1485Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1498Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 1513Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 1530Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 1564Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1565Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 1577Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 1578Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 1592Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 1593Assert.Equal(new object[] { 2, 1, 1 }, owner.Items.Cast<object>()); 1609Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 1610Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 1646Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1659Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 1674Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 1691Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 1728Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 1729Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 1741Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 1742Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 1756Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 1757Assert.Equal(new object[] { 1, 1, 2 }, owner.Items.Cast<object>()); 1773Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 1774Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 1804Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1805Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 1812Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1813Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 1836Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1837Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1844Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1845Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 1872Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1873Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 1880Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1881Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 1888Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1889Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 1916Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1917Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 1923Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1924Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 1930Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 1931Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 1957Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1958Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 1968Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 1969Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 2002Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2003Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2013Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2014Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2051Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2052Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2062Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2063Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2073Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2074Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2111Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2112Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 2122Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2123Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2133Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2134Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2227Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2235Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2251Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2252Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2259Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2260Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2278Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2286Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2305Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2306Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 2313Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2314Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 2335Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2354Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2387Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2388Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2406Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2407Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2442Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2461Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2497Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2498Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 2516Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2517Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 2546Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2547Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 2554Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2555Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 2577Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2578Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2585Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2586Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2612Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2613Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2620Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2621Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2647Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2648Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2654Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2655Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2680Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2681Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 2691Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2692Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 2724Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2725Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2735Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 2736Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 2772Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2773Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2783Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2784Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 2820Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2821Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2831Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 2832Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 2884Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2894Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2913Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2914Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2923Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 2924Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 2945Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2955Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2977Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2978Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 2987Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 2988Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 3012Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 3033Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 3069Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 3070Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 3090Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 3091Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 3129Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 3150Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 3189Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 3190Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 3210Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 3211Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 3243Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3244Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 3253Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3254Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 3279Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3280Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 3289Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3290Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 3319Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3320Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 3329Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3330Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 3359Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3360Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 3368Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3369Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 3397Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3398Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 3410Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3411Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 3446Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3447Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 3459Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 3460Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 3499Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3500Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 3512Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3513Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 3552Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3553Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 3565Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 3566Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 3629Assert.Equal(new object[] { 1, 1 }, collection.Cast<object>()); 3642Assert.Equal(new object[] { 1, 2, 1 }, collection.Cast<object>()); 4132Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4140Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 4148Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 4156Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 4173Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4174Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 4181Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 4182Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 4189Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 4190Assert.Equal(new object[] { 2, 2, 1 }, owner.Items.Cast<object>()); 4197Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 4198Assert.Equal(new object[] { 2, 2, 1, 3 }, owner.Items.Cast<object>()); 4217Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4225Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 4233Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 4241Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 4261Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4262Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 4269Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 4270Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 4277Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 4278Assert.Equal(new object[] { 1, 2, 2 }, owner.Items.Cast<object>()); 4285Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 4286Assert.Equal(new object[] { 1, 2, 2, 3 }, owner.Items.Cast<object>()); 4308Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4321Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 4336Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 4353Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 4387Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4388Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 4400Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 4401Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 4415Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 4416Assert.Equal(new object[] { 2, 2, 1 }, owner.Items.Cast<object>()); 4432Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 4433Assert.Equal(new object[] { 2, 2, 1, 3 }, owner.Items.Cast<object>()); 4469Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4482Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 4497Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 4514Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 4551Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 4552Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 4564Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 4565Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 4579Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 4580Assert.Equal(new object[] { 1, 2, 2 }, owner.Items.Cast<object>()); 4596Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 4597Assert.Equal(new object[] { 1, 2, 2, 3 }, owner.Items.Cast<object>()); 4627Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4628Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 4635Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4636Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 4657Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4658Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 4663Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4664Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 4689Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4690Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4697Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4698Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4705Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4706Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4731Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4732Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 4738Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4739Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 4745Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4746Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 4772Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4773Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 4783Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4784Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 4817Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4818Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 4828Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 4829Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 4866Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4867Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4877Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4878Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4888Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4889Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 4926Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4927Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 4937Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4938Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 4948Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 4949Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 5071Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5079Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5087Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 5115Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5116Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 5122Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5123Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 5129Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 5130Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 5161Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5169Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5177Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 5208Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5209Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 5215Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5216Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 5222Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 5223Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 5255Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5270Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5285Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 5329Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5330Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 5345Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 5346Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 5361Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 5362Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 5407Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5422Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5437Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 5484Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5485Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 5500Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 5501Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 5516Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 5517Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 5554Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5555Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5562Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5563Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5595Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5596Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5603Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5604Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5640Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5641Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5648Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5649Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5656Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 5657Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5692Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5693Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5700Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5701Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5708Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 5709Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5749Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5750Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5760Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5761Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5811Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5812Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5822Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 5823Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5872Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5873Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5882Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5883Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5892Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 5893Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 5940Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5941Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5950Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 5951Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 5960Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 5961Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6018Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 6026Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 6054Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 6055Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 6061Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 6062Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 6093Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 6101Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 6132Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 6133Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 6139Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 6140Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 6172Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 6187Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 6231Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 6232Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 6247Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 6248Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 6293Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 6308Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 6355Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 6356Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 6371Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 6372Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 6409Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6410Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6417Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6418Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6450Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6451Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6458Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6459Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6495Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6496Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6503Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6504Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6511Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 6512Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6547Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6548Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6555Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6556Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6563Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 6564Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6604Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6605Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6615Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6616Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6666Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6667Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6677Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 6678Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6727Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6728Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6737Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6738Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6747Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 6748Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6795Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6796Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6805Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 6806Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 6815Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 6816Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 6960Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 6967Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 6974Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 6981Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 7005Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 7012Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 7019Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7026Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7045Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 7046Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 7052Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 7053Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 7059Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 7060Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 7066Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 7067Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 7088Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 7089Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 7095Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 7096Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 7102Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7103Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 7109Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7110Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 7317Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 7318Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 7334Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 7335Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 7351Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 7352Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 7368Assert.Equal(new int[] { 4, 2, 5 }, collection.Cast<int>()); 7369Assert.Equal(new int[] { 4, 2, 5 }, owner.Items.Cast<int>()); 7408Assert.Equal(new int[] { 4, 2, 3 }, collection.Cast<int>()); 7409Assert.Equal(new int[] { 4, 2, 3 }, owner.Items.Cast<int>()); 7425Assert.Equal(new int[] { 4, 1, 3 }, collection.Cast<int>()); 7426Assert.Equal(new int[] { 4, 1, 3 }, owner.Items.Cast<int>()); 7442Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7443Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 7459Assert.Equal(new int[] { 4, 1, 5 }, collection.Cast<int>()); 7460Assert.Equal(new int[] { 4, 1, 5 }, owner.Items.Cast<int>()); 7490Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7491Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7498Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7499Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7506Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7507Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7514Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7515Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7539Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7540Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7547Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7548Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7555Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7556Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7563Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7564Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7592Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7593Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7600Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7601Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7608Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7609Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7616Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7617Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7624Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 7625Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7632Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 7633Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7662Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7663Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7670Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7671Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7678Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7679Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7686Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7687Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7694Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 7695Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7702Assert.Equal(new object[] { 2, 4 }, owner.SelectedItems.Cast<object>()); 7703Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7736Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7737Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7747Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7748Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7758Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7759Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7769Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7770Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7809Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7810Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7820Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 7821Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7831Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7832Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7842Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7843Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7886Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7887Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7897Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7898Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7908Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7909Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7919Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 7920Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7930Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7931Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7941Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 7942Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 7986Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7987Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 7997Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 7998Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 8008Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 8009Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 8019Assert.Equal(new object[] { 2, 3 }, owner.SelectedItems.Cast<object>()); 8020Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 8030Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 8031Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8041Assert.Equal(new object[] { 2 }, owner.SelectedItems.Cast<object>()); 8042Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8114Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8122Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 8130Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 8138Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 8155Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8156Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 8163Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 8164Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 8171Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 8172Assert.Equal(new object[] { 2, 1, 1 }, owner.Items.Cast<object>()); 8179Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 8180Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 8199Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8207Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 8215Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 8223Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 8243Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8244Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 8251Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 8252Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 8259Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 8260Assert.Equal(new object[] { 1, 1, 2 }, owner.Items.Cast<object>()); 8267Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 8268Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 8290Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8303Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 8318Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 8335Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 8369Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8370Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 8382Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 8383Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 8397Assert.Equal(new object[] { 2, 1, 1 }, collection.Cast<object>()); 8398Assert.Equal(new object[] { 2, 1, 1 }, owner.Items.Cast<object>()); 8414Assert.Equal(new object[] { 2, 1, 1, 3 }, collection.Cast<object>()); 8415Assert.Equal(new object[] { 2, 1, 1, 3 }, owner.Items.Cast<object>()); 8451Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8464Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 8479Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 8496Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 8533Assert.Equal(new object[] { 2 }, collection.Cast<object>()); 8534Assert.Equal(new object[] { 2 }, owner.Items.Cast<object>()); 8546Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 8547Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 8561Assert.Equal(new object[] { 1, 1, 2 }, collection.Cast<object>()); 8562Assert.Equal(new object[] { 1, 1, 2 }, owner.Items.Cast<object>()); 8578Assert.Equal(new object[] { 1, 1, 2, 3 }, collection.Cast<object>()); 8579Assert.Equal(new object[] { 1, 1, 2, 3 }, owner.Items.Cast<object>()); 8609Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8610Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 8617Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8618Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 8641Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8642Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8649Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8650Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8677Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8678Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8685Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8686Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8693Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8694Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8721Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8722Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 8728Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8729Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 8735Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8736Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 8762Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8763Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 8773Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8774Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 8807Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8808Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8818Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 8819Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 8856Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8857Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8867Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8868Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8878Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8879Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 8916Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8917Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 8927Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8928Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 8938Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 8939Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 9454Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9462Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 9470Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 9478Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 9495Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9496Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 9503Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 9504Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 9511Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 9512Assert.Equal(new object[] { 2, 2, 1 }, owner.Items.Cast<object>()); 9519Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 9520Assert.Equal(new object[] { 2, 2, 1, 3 }, owner.Items.Cast<object>()); 9539Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9547Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 9555Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 9563Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 9583Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9584Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 9591Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 9592Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 9599Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 9600Assert.Equal(new object[] { 1, 2, 2 }, owner.Items.Cast<object>()); 9607Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 9608Assert.Equal(new object[] { 1, 2, 2, 3 }, owner.Items.Cast<object>()); 9630Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9643Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 9658Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 9675Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 9709Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9710Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 9722Assert.Equal(new object[] { 2, 1 }, collection.Cast<object>()); 9723Assert.Equal(new object[] { 2, 1 }, owner.Items.Cast<object>()); 9737Assert.Equal(new object[] { 2, 2, 1 }, collection.Cast<object>()); 9738Assert.Equal(new object[] { 2, 2, 1 }, owner.Items.Cast<object>()); 9754Assert.Equal(new object[] { 2, 2, 1, 3 }, collection.Cast<object>()); 9755Assert.Equal(new object[] { 2, 2, 1, 3 }, owner.Items.Cast<object>()); 9791Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9804Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 9819Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 9836Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 9873Assert.Equal(new object[] { 1 }, collection.Cast<object>()); 9874Assert.Equal(new object[] { 1 }, owner.Items.Cast<object>()); 9886Assert.Equal(new object[] { 1, 2 }, collection.Cast<object>()); 9887Assert.Equal(new object[] { 1, 2 }, owner.Items.Cast<object>()); 9901Assert.Equal(new object[] { 1, 2, 2 }, collection.Cast<object>()); 9902Assert.Equal(new object[] { 1, 2, 2 }, owner.Items.Cast<object>()); 9918Assert.Equal(new object[] { 1, 2, 2, 3 }, collection.Cast<object>()); 9919Assert.Equal(new object[] { 1, 2, 2, 3 }, owner.Items.Cast<object>()); 9949Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 9950Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 9957Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 9958Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 9979Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 9980Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 9985Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 9986Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 10011Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10012Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10019Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10020Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10027Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10028Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10053Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10054Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 10060Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10061Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 10067Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10068Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 10094Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10095Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10105Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10106Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10139Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10140Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 10150Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10151Assert.Equal(new int[] { 1 }, owner.SelectedIndices.Cast<int>()); 10188Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10189Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10199Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10200Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10210Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10211Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10248Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10249Assert.Equal(new int[] { 1, 2 }, owner.SelectedIndices.Cast<int>()); 10259Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10260Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 10270Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10271Assert.Equal(new int[] { 1, 3 }, owner.SelectedIndices.Cast<int>()); 10393Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10401Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10409Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 10437Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10438Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 10444Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10445Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 10451Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 10452Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 10483Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10491Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10499Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 10530Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10531Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 10537Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10538Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 10544Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 10545Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 10577Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10592Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10607Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 10651Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10652Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 10667Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 10668Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 10683Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 10684Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 10729Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10744Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10759Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 10806Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10807Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 10822Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 10823Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 10838Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 10839Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 10876Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10877Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10884Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10885Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10917Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10918Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10925Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 10926Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 10962Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10963Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10970Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 10971Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 10978Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 10979Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11014Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11015Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11022Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11023Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11030Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 11031Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11071Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11072Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11082Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11083Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11133Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11134Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11144Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11145Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11194Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11195Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11204Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11205Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11214Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 11215Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11262Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11263Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11272Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11273Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11282Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 11283Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11340Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 11348Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 11376Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 11377Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 11383Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 11384Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 11415Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 11423Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 11454Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 11455Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 11461Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 11462Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 11494Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 11509Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 11553Assert.Equal(new int[] { 2, 3 }, collection.Cast<int>()); 11554Assert.Equal(new int[] { 2, 3 }, owner.Items.Cast<int>()); 11569Assert.Equal(new int[] { 2 }, collection.Cast<int>()); 11570Assert.Equal(new int[] { 2 }, owner.Items.Cast<int>()); 11615Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 11630Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 11677Assert.Equal(new int[] { 1, 3 }, collection.Cast<int>()); 11678Assert.Equal(new int[] { 1, 3 }, owner.Items.Cast<int>()); 11693Assert.Equal(new int[] { 1 }, collection.Cast<int>()); 11694Assert.Equal(new int[] { 1 }, owner.Items.Cast<int>()); 11731Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11732Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11739Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11740Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11772Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11773Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11780Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11781Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11817Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11818Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11825Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11826Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11833Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 11834Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11869Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11870Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11877Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 11878Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 11885Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 11886Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11926Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11927Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11937Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11938Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11988Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 11989Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 11999Assert.Equal(new object[] { 1 }, owner.SelectedItems.Cast<object>()); 12000Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 12049Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 12050Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 12059Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 12060Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 12069Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 12070Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>()); 12117Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 12118Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 12127Assert.Equal(new object[] { 1, 3 }, owner.SelectedItems.Cast<object>()); 12128Assert.Equal(new int[] { 0, 1 }, owner.SelectedIndices.Cast<int>()); 12137Assert.Equal(new object[] { 3 }, owner.SelectedItems.Cast<object>()); 12138Assert.Equal(new int[] { 0 }, owner.SelectedIndices.Cast<int>());
System\Windows\Forms\ListBoxTests.cs (55)
1091Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<object>()); 1099Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<object>()); 1180Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<object>()); 1191Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<object>()); 1518Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 1524Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 1530Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 1614Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 1623Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 1632Assert.Equal(new string[] { "item1", "item2", "item1" }, control.Items.Cast<string>()); 2424Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 2425Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<string>()); 2599Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 2600Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<string>()); 2906Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 2907Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<string>()); 3112Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3113Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<string>()); 3316Assert.Equal(new int[] { 2 }, control.SelectedIndices.Cast<int>()); 3322Assert.Equal(new int[] { 0, 2 }, control.SelectedIndices.Cast<int>()); 3513Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3514Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3522Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3523Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3531Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3532Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3555Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3556Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3564Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3565Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3573Assert.Equal(new int[] { 0, 1 }, control.SelectedIndices.Cast<int>()); 3574Assert.Equal(new string[] { "item1", "item2" }, control.SelectedItems.Cast<object>()); 3976Assert.Equal(expected, control.Items.Cast<string>()); 3982Assert.Equal(expected, control.Items.Cast<string>()); 3988Assert.Equal(new string[] { "item1", "item2" }, control.Items.Cast<string>()); 4090Assert.Equal(expected, control.Items.Cast<string>()); 4099Assert.Equal(expected, control.Items.Cast<string>()); 4108Assert.Equal(new string[] { "item1", "item2" }, control.Items.Cast<string>()); 4563Assert.Equal(new string[] { "item1", "item2" }, control.Items.Cast<object>()); 4568Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 4573Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 4578Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 4596Assert.Equal(new string[] { "item1", "item2" }, control.Items.Cast<object>()); 4604Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 4612Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 4620Assert.Equal(new string[] { "item1", "item2", "item3" }, control.Items.Cast<object>()); 5906Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 5911Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 5958Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 5966Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 6023Assert.Equal(value, control.Items.Cast<object>()); 6028Assert.Equal(value, control.Items.Cast<object>()); 6046Assert.Equal(value, control.Items.Cast<object>()); 6054Assert.Equal(value, control.Items.Cast<object>()); 6076Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>());
System\Windows\Forms\ListViewGroupCollectionTests.cs (5)
167Assert.Same(oldGroup, Assert.Single(collection.Cast<ListViewGroup>())); 382Assert.Equal(new ListViewGroup[] { group1, group2 }, collection.Cast<ListViewGroup>()); 401Assert.Equal(new ListViewGroup[] { group1, group2 }, collection.Cast<ListViewGroup>()); 511ListViewGroup group = Assert.Single(collection.Cast<ListViewGroup>()); 591Assert.Same(group, Assert.Single(collection.Cast<ListViewGroup>()));
System\Windows\Forms\ListViewGroupConverterTests.cs (1)
285Assert.Equal(expected, converter.GetStandardValues(mockContext.Object)?.Cast<object>());
System\Windows\Forms\ListViewGroupTests.cs (2)
1352Assert.Equal(group.Items.Cast<ListViewItem>().Select(i => i.Text), result.Items.Cast<ListViewItem>().Select(i => i.Text));
System\Windows\Forms\ListViewItemTests.cs (23)
35ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 74AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 112AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 150AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 188AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 225AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 262AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 300AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 338AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 375ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 413ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 451AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 488AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 526AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 564AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 602AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 639ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 677ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 715ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 752ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 791AssertEqualListViewSubItem(subItems, item.SubItems.Cast<ListViewItem.ListViewSubItem>().ToArray()); 821ListViewItem.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<ListViewItem.ListViewSubItem>()); 1059ListViewItem.ListViewSubItem subItem = Assert.Single(actual.Cast<ListViewItem.ListViewSubItem>());
System\Windows\Forms\ListViewSubItemCollectionTests.cs (2)
252ListViewItem.ListViewSubItem subItem = Assert.Single(collection.Cast<ListViewItem.ListViewSubItem>()); 273ListViewItem.ListViewSubItem subItem = Assert.Single(collection.Cast<ListViewItem.ListViewSubItem>());
System\Windows\Forms\ListViewTests.cs (2)
880Assert.Equal(new ListViewItem[] { item1, item2 }, listView.Items.Cast<ListViewItem>()); 1053Assert.Equal(new ListViewItem[] { item1, item2 }, listView.Items.Cast<ListViewItem>());
System\Windows\Forms\SpecialFolderEnumConverterTests.cs (3)
75Assert.Equal(expected, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 84Assert.Equal(new Environment.SpecialFolder[] { Environment.SpecialFolder.Personal }, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 93Assert.Equal(new CustomEnum[] { CustomEnum.Value }, converter.GetStandardValues(null).Cast<CustomEnum>());
System\Windows\Forms\TabControl.ControlCollectionTests.cs (28)
88Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 89Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 116Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 117Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 227Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 228Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 268Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 269Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 388Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 389Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 422Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 423Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 545Assert.Equal(new Control[] { value1, value2 }, collection.Cast<Control>()); 546Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 592Assert.Equal(new Control[] { value2, value1 }, collection.Cast<Control>()); 593Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 743Assert.Equal(items, collection.Cast<Control>()); 744Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 1369Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1374Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1379Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1407Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 1412Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 1417Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 1438Assert.Equal(items, collection.Cast<Control>()); 1439Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 1447Assert.Equal(items, collection.Cast<Control>()); 1448Assert.Equal(items, owner.TabPages.Cast<TabPage>());
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (90)
74Assert.Equal(new TabPage[] { value1, value2 }, collection.Cast<TabPage>()); 75Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 76Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 103Assert.Equal(new TabPage[] { value1, value2, value1 }, collection.Cast<TabPage>()); 104Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 105Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 216Assert.Equal(new TabPage[] { value1, value2 }, collection.Cast<TabPage>()); 217Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 218Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 258Assert.Equal(new TabPage[] { value1, value2, value1 }, collection.Cast<TabPage>()); 259Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 260Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 380Assert.Equal(new TabPage[] { value1, value2 }, collection.Cast<TabPage>()); 381Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 382Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 415Assert.Equal(new TabPage[] { value1, value2, value1, }, collection.Cast<TabPage>()); 416Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 417Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 540Assert.Equal(new TabPage[] { value1, value2 }, collection.Cast<TabPage>()); 541Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 542Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 588Assert.Equal(new TabPage[] { value1, value2, value1 }, collection.Cast<TabPage>()); 589Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 590Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 746Assert.Equal(items, collection.Cast<TabPage>()); 747Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 748Assert.Equal(items, owner.Controls.Cast<Control>()); 1021Assert.Equal(new TabPage[] { value1, value2 }, collection.Cast<TabPage>()); 1022Assert.Equal(new TabPage[] { value1, value2 }, owner.TabPages.Cast<TabPage>()); 1049Assert.Equal(new TabPage[] { value1, value2, value1 }, collection.Cast<TabPage>()); 1050Assert.Equal(new TabPage[] { value1, value2, value1 }, owner.TabPages.Cast<TabPage>()); 1116Assert.Equal(new TabPage[] { child1, child2, child3 }, collection.Cast<TabPage>()); 1128Assert.Equal(new TabPage[] { child1, child2, child3, child1, child2, child3 }, collection.Cast<TabPage>()); 1141Assert.Equal(new TabPage[] { child1, child2, child3, child1, child2, child3 }, collection.Cast<TabPage>()); 2016Assert.Equal(new TabPage[] { value2, value1 }, collection.Cast<TabPage>()); 2017Assert.Equal(new TabPage[] { value2, value1 }, owner.TabPages.Cast<TabPage>()); 2018Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2047Assert.Equal(new TabPage[] { value2, value1, value1 }, collection.Cast<TabPage>()); 2048Assert.Equal(new TabPage[] { value2, value1, value1 }, owner.TabPages.Cast<TabPage>()); 2049Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2153Assert.Equal(new TabPage[] { value2, value1 }, collection.Cast<TabPage>()); 2154Assert.Equal(new TabPage[] { value2, value1 }, owner.TabPages.Cast<TabPage>()); 2155Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2197Assert.Equal(new TabPage[] { value2, value1, value1 }, collection.Cast<TabPage>()); 2198Assert.Equal(new TabPage[] { value2, value1, value1 }, owner.TabPages.Cast<TabPage>()); 2199Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2323Assert.Equal(new TabPage[] { value2, value1 }, collection.Cast<TabPage>()); 2324Assert.Equal(new TabPage[] { value2, value1 }, owner.TabPages.Cast<TabPage>()); 2325Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2360Assert.Equal(new TabPage[] { value2, value1, value1 }, collection.Cast<TabPage>()); 2361Assert.Equal(new TabPage[] { value2, value1, value1 }, owner.TabPages.Cast<TabPage>()); 2362Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2489Assert.Equal(new TabPage[] { value2, value1 }, collection.Cast<TabPage>()); 2490Assert.Equal(new TabPage[] { value2, value1 }, owner.TabPages.Cast<TabPage>()); 2491Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2539Assert.Equal(new TabPage[] { value2, value1, value1 }, collection.Cast<TabPage>()); 2540Assert.Equal(new TabPage[] { value2, value1, value1 }, owner.TabPages.Cast<TabPage>()); 2541Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2696Assert.Equal(items, collection.Cast<TabPage>()); 2697Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 2698Assert.Equal(items, owner.Controls.Cast<TabPage>()); 3062Assert.Equal(new TabPage[] { value2, value1 }, collection.Cast<TabPage>()); 3063Assert.Equal(new TabPage[] { value2, value1 }, owner.TabPages.Cast<TabPage>()); 3064Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3093Assert.Equal(new TabPage[] { value2, value1, value1 }, collection.Cast<TabPage>()); 3094Assert.Equal(new TabPage[] { value2, value1, value1 }, owner.TabPages.Cast<TabPage>()); 3095Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3380Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3425Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3465Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3521Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3779Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3823Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3862Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3917Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 4473Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4478Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4483Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 4513Assert.Equal(new Control[] { value1, value3, value4 }, collection.Cast<TabPage>()); 4518Assert.Equal(new Control[] { value1, value3 }, collection.Cast<TabPage>()); 4523Assert.Equal(new Control[] { value3 }, collection.Cast<TabPage>()); 4544Assert.Equal(items, collection.Cast<TabPage>()); 4545Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 4553Assert.Equal(items, collection.Cast<TabPage>()); 4554Assert.Equal(items, owner.TabPages.Cast<TabPage>()); 4840Assert.Equal(new TabPage[] { child1 }, collection.Cast<TabPage>()); 4934Assert.Equal(new TabPage[] { child1, child3 }, collection.Cast<TabPage>()); 4947Assert.Equal(new TabPage[] { child1 }, collection.Cast<TabPage>()); 4993Assert.Equal(new TabPage[] { child1, child2, child3 }, collection.Cast<TabPage>()); 4997Assert.Equal(new TabPage[] { child1, child2, child3 }, collection.Cast<TabPage>());
System\Windows\Forms\TabControlTests.cs (8)
2136Assert.Equal(expectedVisible, control.TabPages.Cast<TabPage>().Select(p => p.Visible)); 2145Assert.Equal(expectedVisible, control.TabPages.Cast<TabPage>().Select(p => p.Visible)); 4891Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4892Assert.Equal(new TabPage[] { page1, page2 }, control.TabPages.Cast<TabPage>()); 4899Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4900Assert.Equal(new TabPage[] { page1, page2 }, control.TabPages.Cast<TabPage>()); 4908Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4909Assert.Equal(new TabPage[] { page1, page2 }, control.TabPages.Cast<TabPage>());
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (6)
38Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 64Assert.Equal(new Control[] { control1, control2 }, collection.Cast<Control>()); 69Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 80Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>()); 85Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 95Assert.Equal(new Control[] { control2, control1 }, collection.Cast<Control>());
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
185_toolStripComboBox.Items.Cast<string>().Should().Contain(items);
System\Windows\Forms\ToolStripDropDownItemTests.cs (1)
343Assert.Equal(expectedDropDownItems, item.DropDownItems.Cast<ToolStripItem>());
System\Windows\Forms\ToolStripDropDownTests.cs (2)
3582Assert.Equal(new ToolStripItem[] { item1, item2 }, control.Items.Cast<ToolStripItem>()); 3601Assert.Equal(new ToolStripItem[] { item1, item2 }, control.Items.Cast<ToolStripItem>());
System\Windows\Forms\ToolStripSplitButtonTests.cs (1)
162toolStripSplitButton.DropDownItems.Cast<ToolStripItem>().Should().ContainInOrder(new[] { item1, item2 });
System\Windows\Forms\ToolStripTests.cs (3)
275Assert.Equal(items, control.Items.Cast<ToolStripItem>()); 4736Assert.Equal(new ToolStripItem[] { item1, item2 }, control.Items.Cast<ToolStripItem>()); 4755Assert.Equal(new ToolStripItem[] { item1, item2 }, control.Items.Cast<ToolStripItem>());
System\Windows\Forms\TreeNodeTests.cs (2)
127Assert.Equal(children, node.Nodes.Cast<TreeNode>()); 218Assert.Equal(children, node.Nodes.Cast<TreeNode>());
System\Windows\Forms\TreeViewImageIndexConverterTests.cs (1)
94result.Cast<int>().Should().ContainInOrder(0, 1, ImageList.Indexer.DefaultIndex, -2);
System.Windows.Forms.UI.IntegrationTests (1)
TabControlTests.cs (1)
104var originalPages = tabControl.TabPages.Cast<TabPage>().ToArray();
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27ImmutableHashSet.CreateRange(Enum.GetValues(typeof(OutputKind)).Cast<OutputKind>());
WindowsBase.Tests (19)
System\ComponentModel\GroupDescriptionTests.cs (5)
368Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 407Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 420Assert.Equal(new[] { description2 }, description.SortDescriptions.Cast<SortDescription>()); 446Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 461Assert.Equal(new[] { description2 }, description.SortDescriptions.Cast<SortDescription>());
System\ComponentModel\SortDescriptionCollectionTests.cs (14)
92Assert.Equal(new[] { description1 }, events[0].OldItems!.Cast<SortDescription>()); 96Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 177Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 191Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 256Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 270Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 345Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 359Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 584Assert.Equal(new[] { description2 }, events[0].OldItems!.Cast<SortDescription>()); 596Assert.Equal(new[] { description3 }, events[1].OldItems!.Cast<SortDescription>()); 670Assert.Equal(new[] { description2 }, events[0].OldItems!.Cast<SortDescription>()); 682Assert.Equal(new[] { description3 }, events[1].OldItems!.Cast<SortDescription>()); 748Assert.Equal(new[] { description1 }, events[0].OldItems!.Cast<SortDescription>()); 752Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>());
XmlFileLogger (2)
LogProcessNode.cs (1)
117return _childNodes.ContainsKey(t) ? _childNodes[t].Cast<T>() : new List<T>();
ObjectModel\Project.cs (1)
132Properties.AddProperties(projectStartedEventArgs.Properties.Cast<DictionaryEntry>());
xunit.assert (9)
CollectionAsserts.cs (2)
629 return Single(collection.Cast<object>()); 652 GetSingleResult(collection.Cast<object>(), item => object.Equals(item, expected), ArgumentFormatter.Format(expected));
Sdk\AssertHelper.cs (2)
561 var expectedValues = expected.Cast<object?>().ToList(); 562 var actualValues = actual.Cast<object?>().ToList();
Sdk\CollectionTracker.cs (5)
201 var dictionaryYKeys = new HashSet<object>(dictionaryY.Keys.Cast<object>()); 208 foreach (var key in dictionaryX.Keys.Cast<object>()) 344 var setX = new HashSet<object>(enumX.Cast<object>()); 345 var setY = new HashSet<object>(enumY.Cast<object>()); 452 new CollectionTracker<object>(enumerable, enumerable.Cast<object>());
xunit.console (2)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (2)
108CreateLibraries(compileTarget?.Libraries, false, libraryStubs).Cast<CompilationLibrary>().ToArray(), 109CreateLibraries(runtimeTarget.Libraries, true, libraryStubs).Cast<RuntimeLibrary>().ToArray(),
Xunit.NetCore.Extensions (1)
AssemblyFixtureSupport\XunitTestAssemblyRunnerWithAssemblyFixture.cs (1)
39.Cast<AssemblyFixtureAttribute>()