Implemented interface members:

property
this
System.Collections.Generic.IList<T>.this[System.Int32]

property
this
System.Collections.Generic.IReadOnlyList<T>.this[System.Int32]
497 writes to Item
aspire (2)
Aspire.Dashboard (3)
Aspire.Hosting (4)
Aspire.Hosting.Azure (1)
dotnet-svcutil-lib (13)
dotnet-user-jwts (2)
GenerateDocumentationAndConfigFiles (6)
illink (1)
InMemory.FunctionalTests (1)
Metrics (2)
Metrics.Legacy (2)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (6)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.HttpOverrides (4)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.RazorPages (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Routing.Abstractions (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Microsoft.Build (5)
Microsoft.Build.Engine.UnitTests (1)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (6)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.CSharp (2)
Microsoft.Extensions.AI (3)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AsyncState (2)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.DataIngestion (1)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Maui (3)
Microsoft.Maui.Controls (7)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.Maui.Graphics (12)
Microsoft.ML.CodeGenerator (2)
Microsoft.ML.Core (2)
Microsoft.ML.Data (9)
Microsoft.ML.FastTree (1)
Microsoft.ML.LightGbm (1)
Microsoft.ML.OnnxTransformer (1)
Microsoft.ML.Sweeper (1)
Microsoft.ML.TestFramework (3)
Microsoft.ML.TimeSeries (3)
Microsoft.ML.Tokenizers (8)
Microsoft.ML.TorchSharp (2)
Microsoft.ML.Transforms (1)
Microsoft.NET.StringTools (4)
PresentationCore (57)
PresentationFramework (67)
PresentationFramework.Aero (1)
PresentationFramework.Aero2 (1)
PresentationFramework.AeroLite (1)
PresentationFramework.Classic (1)
PresentationFramework.Luna (1)
PresentationFramework.Royale (1)
ReachFramework (5)
Roslyn.Diagnostics.Analyzers (6)
Roslyn.Diagnostics.CSharp.Analyzers (5)
System.Collections.Immutable (2)
System.ComponentModel.Composition (1)
System.ComponentModel.TypeConverter (4)
System.Data.Common (4)
System.Data.Odbc (1)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.TraceSource (2)
System.Formats.Nrbf (3)
System.Linq (1)
System.Linq.Expressions (2)
System.Net.Http (2)
System.Net.Security (1)
System.Private.CoreLib (8)
System.Private.DataContractSerialization (1)
System.Private.Xml (15)
System.Reflection.Metadata (1)
System.ServiceModel.Primitives (1)
System.Text.Json (2)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (15)
System.Text.RegularExpressions.Generator (8)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
573results[i] = result;
System.Threading.Tasks.Dataflow (10)
System.Windows.Forms (22)
System.Windows.Forms.Design (8)
System.Windows.Forms.Primitives (2)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (1)
System.Xaml (2)
Test.Utilities (2)
Text.Analyzers (6)
VBCSCompiler (1)
WinFormsControlsTest (1)
5406 references to Item
aspire (16)
Aspire.Azure.Messaging.EventHubs (6)
Aspire.Azure.Messaging.ServiceBus (6)
Aspire.Azure.Messaging.WebPubSub (6)
Aspire.Azure.Storage.Queues (6)
Aspire.Dashboard (34)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (4)
Aspire.Hosting (12)
Aspire.Hosting.Analyzers (2)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Azure.CosmosDB (6)
Aspire.Hosting.Azure.Functions (1)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.CodeGeneration.Python (1)
Aspire.Hosting.JavaScript (1)
Aspire.Hosting.JavaScript.Tests (5)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.Tests (8)
Aspire.Microsoft.Azure.Cosmos (6)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (6)
Aspire.Playground.Tests (2)
CodeGenerator (4)
ConfigurationSchemaGenerator (4)
CSharpSyntaxGenerator (11)
DemoConsole (7)
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (177)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\EndpointAddressProcessor.cs (1)
83Attr a = attrSet[i];
dotnet-svcutil-lib.Tests (4)
dotnet-user-jwts (18)
GenerateDocumentationAndConfigFiles (28)
IIS.FunctionalTests (2)
IIS.LongTests (3)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (3)
IISExpress.FunctionalTests (5)
illink (20)
InMemory.FunctionalTests (23)
IOperationGenerator (3)
Metrics (21)
Metrics.Legacy (21)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Extra.Tests (4)
Microsoft.Analyzers.Local (1)
Microsoft.Analyzers.Local.Tests (5)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.Antiforgery (8)
Microsoft.AspNetCore.Antiforgery.Microbenchmarks (1)
Microsoft.AspNetCore.App.Analyzers (6)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Components (12)
Microsoft.AspNetCore.Components.Endpoints (10)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Tests (5)
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.Test (5)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Microsoft.AspNetCore.DataProtection.Tests (1)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
Microsoft.AspNetCore.Http.Connections (6)
Microsoft.AspNetCore.Http.Extensions (10)
Microsoft.AspNetCore.Http.Microbenchmarks (15)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.AspNetCore.HttpLogging (7)
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.Mvc.Abstractions (5)
Microsoft.AspNetCore.Mvc.Core (26)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (3)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (8)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (31)
Rendering\HtmlHelperNameExtensionsTest.cs (28)
272{ m => collection[index1], "collection[5]", "collection_5_" },
273{ m => nestedCollection[index1][23], "nestedCollection[5][23]", "nestedCollection_5__23_" },
274{ m => nestedCollection[index1][index2], "nestedCollection[5][23]", "nestedCollection_5__23_" },
275{ m => nestedCollection[_index][Index], "nestedCollection[7][9]", "nestedCollection_7__9_" },
276{ m => nestedCollection[Index][StaticIndex], "nestedCollection[9][8]", "nestedCollection_9__8_" },
278{ m => _collection[_index], "_collection[7]", "zcollection_7_" },
279{ m => _nestedCollection[_index][23], "_nestedCollection[7][23]", "znestedCollection_7__23_" },
280{ m => _nestedCollection[_index][index2], "_nestedCollection[7][23]", "znestedCollection_7__23_" },
281{ m => _nestedCollection[Index][_staticIndex], "_nestedCollection[9][6]", "znestedCollection_9__6_" },
282{ m => _nestedCollection[StaticIndex][_index], "_nestedCollection[8][7]", "znestedCollection_8__7_" },
284{ m => Collection[Index], "Collection[9]", "Collection_9_" },
285{ m => NestedCollection[Index][23], "NestedCollection[9][23]", "NestedCollection_9__23_" },
286{ m => NestedCollection[Index][index2], "NestedCollection[9][23]", "NestedCollection_9__23_" },
287{ m => NestedCollection[_index][Index], "NestedCollection[7][9]", "NestedCollection_7__9_" },
288{ m => NestedCollection[Index][StaticIndex], "NestedCollection[9][8]", "NestedCollection_9__8_" },
289{ m => _staticCollection[_staticIndex], "_staticCollection[6]", "zstaticCollection_6_" },
290{ m => _staticCollection[Index], "_staticCollection[9]", "zstaticCollection_9_" },
291{ m => _staticCollection[_index], "_staticCollection[7]", "zstaticCollection_7_" },
292{ m => StaticCollection[StaticIndex], "StaticCollection[8]", "StaticCollection_8_" },
293{ m => StaticCollection[_staticIndex], "StaticCollection[6]", "StaticCollection_6_" },
294{ m => StaticCollection[index1], "StaticCollection[5]", "StaticCollection_5_" },
295{ m => m[index1].Inner.Name, "[5].Inner.Name", "z5__Inner_Name" },
296{ m => m[_staticIndex].Inner.Name, "[6].Inner.Name", "z6__Inner_Name" },
297{ m => m[_index].Inner.Name, "[7].Inner.Name", "z7__Inner_Name" },
298{ m => m[StaticIndex].Inner.Name, "[8].Inner.Name", "z8__Inner_Name" },
299{ m => m[Index].Inner.Name, "[9].Inner.Name", "z9__Inner_Name" },
335ExceptionAssert.Throws<InvalidOperationException>(() => helper.IdFor(m => collection[m]), message);
336ExceptionAssert.Throws<InvalidOperationException>(() => helper.NameFor(m => collection[m]), message);
Microsoft.AspNetCore.OpenApi (9)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (3)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
Microsoft.AspNetCore.OutputCaching.Tests (2)
Microsoft.AspNetCore.Owin.Microbenchmarks (1)
Microsoft.AspNetCore.Razor (4)
Microsoft.AspNetCore.Razor.Runtime (3)
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCaching.Tests (2)
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
Microsoft.AspNetCore.Rewrite (2)
Microsoft.AspNetCore.Routing (31)
Microsoft.AspNetCore.Routing.Abstractions (1)
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
Microsoft.AspNetCore.Routing.Tests (4)
Microsoft.AspNetCore.Security.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
Microsoft.AspNetCore.Server.IIS (3)
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (6)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (3)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.AspNetCore.SignalR.Client.Tests (6)
Microsoft.AspNetCore.SignalR.Common (6)
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (6)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (6)
Microsoft.AspNetCore.SignalR.Specification.Tests (6)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (6)
Microsoft.AspNetCore.StaticAssets (2)
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
Microsoft.AspNetCore.WebUtilities (4)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
Microsoft.Build (42)
Microsoft.Build.Engine.OM.UnitTests (20)
Microsoft.Build.Engine.UnitTests (26)
Microsoft.Build.Framework (6)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
Microsoft.Build.Tasks.Core (52)
MSBuild.cs (14)
509if (projects[i] != null)
512string projectPath = FileUtilities.AttemptToShortenPath(projects[i].ItemSpec);
514projectNames[i] = projects[i].ItemSpec;
519if (!String.IsNullOrEmpty(projects[i].GetMetadata("Properties")))
522log, ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("General.OverridingProperties", projectNames[i]), "Properties", projects[i].GetMetadata("Properties").Split(MSBuildConstants.SemicolonChar),
537string projectUndefineProperties = projects[i].GetMetadata("UndefineProperties");
559if (!String.IsNullOrEmpty(projects[i].GetMetadata("AdditionalProperties")))
562log, ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("General.AdditionalProperties", projectNames[i]), "AdditionalProperties", projects[i].GetMetadata("AdditionalProperties").Split(MSBuildConstants.SemicolonChar),
588if (!String.IsNullOrEmpty(projects[i].GetMetadata("ToolsVersion")))
590toolsVersions[i] = projects[i].GetMetadata("ToolsVersion");
634if (projects[i] != null)
646log.LogWarningWithCodeFromResources(null, projects[i].ItemSpec, 0, 0, 0, 0, "MSBuild.CannotRebaseOutputItemPath", outputItemFromTarget.ItemSpec, e.Message);
652projects[i].CopyMetadataTo(outputItemFromTarget);
657outputItemFromTarget.SetMetadata(ItemMetadataNames.msbuildSourceProjectFile, projects[i].GetMetadata(ItemSpecModifiers.FullPath));
Microsoft.Build.Tasks.UnitTests (22)
Microsoft.Build.UnitTests.Shared (7)
Microsoft.Cci.Extensions (2)
Microsoft.CodeAnalysis (39)
Microsoft.CodeAnalysis.Analyzers (29)
Microsoft.CodeAnalysis.AnalyzerUtilities (22)
Microsoft.CodeAnalysis.BannedApiAnalyzers (29)
Microsoft.CodeAnalysis.CodeStyle (19)
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.CSharp (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Features (4)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (48)
Syntax\SyntaxNodeTests.cs (36)
416Assert.Equal(directives[i], descendantDirectives[i]);
600Assert.Equal(identifierNodes[i].ToString(), nodesWithMyAnnotations[i].ToString());
1070Assert.Equal(list1[i], list2[i]);
1071Assert.Equal(list1[i].FullSpan.Start, list2[i].FullSpan.Start);
1093Assert.Equal(list[i], tokens[i]);
1122Assert.Equal(list[i], tokens[i]);
1148Assert.Equal(list[i], tokens[i]);
1170Assert.Equal(list[i], tokens[i]);
1193Assert.Equal(list[i], tokens[i]);
1223Assert.Equal(list[i], tokens[i]);
1253Assert.Equal(tokens[i], list[i]);
1277Assert.Equal(list[i], tokens[i]);
1298Assert.Equal(list[i], tokens[i]);
1319Assert.Equal(list[i], tokens[i]);
1343Assert.Equal(list[i], tokens[i]);
1366Assert.Equal(tokens[i], list[i]);
1384Assert.Equal(list[i], children[i]);
1395for (var child = children[children.Count - 1]; child.Kind() != SyntaxKind.None; child = child.GetPreviousSibling())
1403Assert.Equal(list[i], reversed[i]);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
Microsoft.CodeAnalysis.Extensions.Package (1)
Microsoft.CodeAnalysis.Features (25)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (28)
Microsoft.CodeAnalysis.PublicApiAnalyzers (21)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (21)
Microsoft.CodeAnalysis.Scripting (3)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (9)
Microsoft.CodeAnalysis.Workspaces (33)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Microsoft.CSharp (46)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (9)
851int n = CompareSrcTypesBased(typeBestSrc, prguci[iuciBestSrc].SrcImplicit, typeFrom, fFromImplicit);
878int n = CompareDstTypesBased(typeBestDst, prguci[iuciBestDst].DstImplicit, typeTo, fToImplicit);
907UdConvInfo uci = prguci[iuci];
967int n = CompareSrcTypesBased(typeBestSrc, prguci[iuciBestSrc].SrcImplicit, typeFrom, uci.SrcImplicit);
981int n = CompareDstTypesBased(typeBestDst, prguci[iuciBestDst].DstImplicit, typeTo, uci.DstImplicit);
1007MethWithInst mwiBest = new MethWithInst(prguci[iuciBest].Meth.Meth(), prguci[iuciBest].Meth.GetType(), null);
1087return ErrorHandling.Error(ErrorCode.ERR_AmbigUDConv, prguci[iuciBestSrc].Meth, prguci[iuciBestDst].Meth, typeSrc, typeDst);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (10)
429int nT = WhichBofsIsBetter(binopSignatures[bestSignature], binopSignatures[index], info.type1, info.type2);
455if (WhichBofsIsBetter(binopSignatures[bestSignature], binopSignatures[index], info.type1, info.type2) >= 0)
571return BindStandardBinopCore(info, binopSignatures[bestBinopSignature], ek, flags);
1247int nT = WhichUofsIsBetter(pSignatures[nBestSignature], pSignatures[iuofs], type);
1271if (WhichUofsIsBetter(pSignatures[nBestSignature], pSignatures[iuofs], type) >= 0)
1286UnaOpFullSig uofs = pSignatures[nBestSignature];
Microsoft.Data.Analysis (32)
Microsoft.Data.Analysis.Tests (4)
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.CMake.Sdk (1)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.SignTool (1)
Microsoft.DotNet.StrongName (4)
Microsoft.Extensions.AI (14)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Abstractions.Tests (4)
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Safety (3)
Microsoft.Extensions.AI.Integration.Tests (3)
Microsoft.Extensions.AI.OpenAI.Tests (75)
OpenAIChatClientTests.cs (14)
250Assert.Equal("chatcmpl-ADxFKtX6xIwdWRN42QvBj2u1RZpCK", updates[i].ResponseId);
251Assert.Equal("chatcmpl-ADxFKtX6xIwdWRN42QvBj2u1RZpCK", updates[i].MessageId);
252Assert.Equal(createdAt, updates[i].CreatedAt);
253Assert.Equal("gpt-4o-mini-2024-07-18", updates[i].ModelId);
254Assert.Equal(ChatRole.Assistant, updates[i].Role);
255Assert.Equal(i == 10 ? 0 : 1, updates[i].Contents.Count);
256Assert.Equal(i < 10 ? null : ChatFinishReason.Stop, updates[i].FinishReason);
1339Assert.Equal("chatcmpl-ADymNiWWeqCJqHNFXiI1QtRcLuXcl", updates[i].ResponseId);
1340Assert.Equal("chatcmpl-ADymNiWWeqCJqHNFXiI1QtRcLuXcl", updates[i].MessageId);
1341Assert.Equal(createdAt, updates[i].CreatedAt);
1342Assert.Equal("gpt-4o-mini-2024-07-18", updates[i].ModelId);
1343Assert.Equal(ChatRole.Assistant, updates[i].Role);
1344Assert.Equal(i < 7 ? null : ChatFinishReason.ToolCalls, updates[i].FinishReason);
1347FunctionCallContent fcc = Assert.IsType<FunctionCallContent>(Assert.Single(updates[updates.Count - 1].Contents));
OpenAIResponseClientTests.cs (59)
319Assert.Equal("resp_68b5ebab461881969ed94149372c2a530698ecbf1b9f2704", updates[i].ResponseId);
320Assert.Equal("resp_68b5ebab461881969ed94149372c2a530698ecbf1b9f2704", updates[i].ConversationId);
321Assert.Equal(createdAt, updates[i].CreatedAt);
322Assert.Equal("o4-mini-2025-04-16", updates[i].ModelId);
323Assert.Null(updates[i].AdditionalProperties);
328Assert.Single(updates[i].Contents);
329Assert.Null(updates[i].Role);
331var reasoning = Assert.IsType<TextReasoningContent>(updates[i].Contents.Single());
338Assert.Single(updates[i].Contents);
343Assert.Empty(updates[i].Contents);
346Assert.Equal(i < updates.Count - 1 ? null : ChatFinishReason.Stop, updates[i].FinishReason);
451Assert.Equal("resp_reasoning123", updates[i].ResponseId);
452Assert.Equal(createdAt, updates[i].CreatedAt);
453Assert.Equal("o4-mini-2025-04-16", updates[i].ModelId);
677Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ResponseId);
678Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ConversationId);
679Assert.Equal(createdAt, updates[i].CreatedAt);
680Assert.Equal("gpt-4o-mini-2024-07-18", updates[i].ModelId);
681Assert.Null(updates[i].AdditionalProperties);
682Assert.Equal((i >= 4 && i <= 12) || i == 16 ? 1 : 0, updates[i].Contents.Count);
683Assert.Equal(i < updates.Count - 1 ? null : ChatFinishReason.Stop, updates[i].FinishReason);
688Assert.Equal(ChatRole.Assistant, updates[i].Role);
915Assert.Equal("resp_0b949080ec8e4b8a006920e0661d00819383ed81438ab11299", updates[i].ResponseId);
916Assert.Equal("resp_0b949080ec8e4b8a006920e0661d00819383ed81438ab11299", updates[i].ConversationId);
917Assert.Equal(DateTimeOffset.FromUnixTimeSeconds(1_763_762_278), updates[i].CreatedAt);
918Assert.Equal("computer-use-preview-2025-03-11", updates[i].ModelId);
919Assert.Null(updates[i].AdditionalProperties);
920Assert.Equal(i >= 3 ? 1 : 0, updates[i].Contents.Count);
921Assert.Equal(i >= 4 ? ChatFinishReason.Stop : null, updates[i].FinishReason);
922Assert.Null(updates[i].Role);
2634Assert.Equal("resp_68d401a7b36c81a288600e95a5a119d4073420ed59d5f559", updates[i].ResponseId);
2635Assert.Equal("resp_68d401a7b36c81a288600e95a5a119d4073420ed59d5f559", updates[i].ConversationId);
2636Assert.Equal(createdAt, updates[i].CreatedAt);
2637Assert.Equal("gpt-4o-2024-08-06", updates[i].ModelId);
2638Assert.Null(updates[i].AdditionalProperties);
2642Assert.NotNull(updates[i].ContinuationToken);
2643var responsesContinuationToken = TestOpenAIResponsesContinuationToken.FromToken(updates[i].ContinuationToken!);
2646Assert.Null(updates[i].FinishReason);
2650Assert.Null(updates[i].ContinuationToken);
2651Assert.Equal(ChatFinishReason.Stop, updates[i].FinishReason);
2654Assert.Equal((i >= 5 && i <= 13) || i == 17 ? 1 : 0, updates[i].Contents.Count);
2725Assert.Equal("resp_68d40dc671a0819cb0ee920078333451029e611c3cc4a34b", updates[i].ResponseId);
2726Assert.Equal("resp_68d40dc671a0819cb0ee920078333451029e611c3cc4a34b", updates[i].ConversationId);
2733Assert.NotNull(updates[i].ContinuationToken);
2734var responsesContinuationToken = TestOpenAIResponsesContinuationToken.FromToken(updates[i].ContinuationToken!);
2738Assert.Single(updates[i].Contents);
2743Assert.NotNull(updates[i].ContinuationToken);
2744var responsesContinuationToken = TestOpenAIResponsesContinuationToken.FromToken(updates[i].ContinuationToken!);
2748Assert.Empty(updates[i].Contents);
2753Assert.Null(updates[i].ContinuationToken);
2754Assert.Single(updates[i].Contents);
3712Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ResponseId);
3713Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ConversationId);
3793Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ResponseId);
3794Assert.Null(updates[i].ConversationId);
3871Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ResponseId);
3872Assert.Equal("conv_12345", updates[i].ConversationId);
3949Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ResponseId);
3950Assert.Equal("resp_67d329fbc87c81919f8952fe71dafc96029dabe3ee19bb77", updates[i].ConversationId);
Microsoft.Extensions.AI.Tests (13)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (6)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.Xml (2)
Microsoft.Extensions.DataIngestion (5)
Microsoft.Extensions.DataIngestion.Tests (8)
Microsoft.Extensions.DependencyInjection (7)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Diagnostics.Testing (5)
Microsoft.Extensions.FileProviders.Composite (1)
Microsoft.Extensions.FileProviders.Embedded (4)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Diagnostics (4)
Microsoft.Extensions.Http.Polly.Tests (1)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (2)
Microsoft.Extensions.Logging.Generators (6)
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
Microsoft.Extensions.Options.SourceGeneration (2)
Microsoft.Extensions.Primitives (1)
Microsoft.Extensions.ServiceDiscovery.Dns (1)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Validation.ValidationsGenerator (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Unit.Tests (2)
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports.Unit.Tests (2)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.SourceGeneration (3)
Microsoft.Maui (11)
Microsoft.Maui.Controls (186)
Shell\ShellSection.cs (32)
67 return _navStack[_navStack.Count - 1];
119 var page = _navStack[_navStack.Count - 1];
140 oldStack[i].SendDisappearing();
146 RemovePage(oldStack[i]);
159 var last = _navStack[_navStack.Count - 1];
335 var routeToRemove = Routing.GetRoute(navStackCopy[i]);
336 if (i > globalRoutes.Count || routeToRemove != globalRoutes[i - 1])
338 OnRemovePage(navStackCopy[i]);
359 if (navIndex < _navStack.Count && Routing.GetRoute(_navStack[navIndex]) == globalRoutes[i])
364 var page = GetOrCreateFromRoute(globalRoutes[i], queryData, services, i == globalRoutes.Count - 1, false);
372 Navigation.InsertPageBefore(page, _navStack[navIndex]);
387 route = globalRoutes[i];
395 Page navPage = navStack.Count > i + 1 ? navStack[i + 1] : null;
421 bool isAnimated = animate ?? IsNavigationAnimated(navStack[navStack.Count - 1]);
431 if (nextModalPageToPopIndex >= 0 && navStack[nextModalPageToPopIndex] == navPage)
436 if (Navigation.ModalStack.Contains(navStack[navStack.Count - 1]))
454 bool isAnimated = animate ?? IsNavigationAnimated(_navStack[_navStack.Count - 1]);
459 OnRemovePage(_navStack[_navStack.Count - 2]);
482 if (Routing.GetRoute(_navStack[j]) == globalRoutes[i])
492 OnRemovePage(_navStack[j]);
541 var content = GetOrCreateFromRoute(globalRoutes[i], queryData, services, isLast, false);
573 var modalPage = modalPageStacks[i];
618 bool isAnimated = animate ?? IsNavigationAnimated(pages[i]);
619 await OnPushAsync(pages[i], isAnimated);
622 Navigation.InsertPageBefore(pages[i], pages[i + 1]);
790 var page = _navStack[_navStack.Count - 1];
829 var page = _navStack[_navStack.Count - 1];
847 oldStack[i].SendDisappearing();
848 RemovePage(oldStack[i]);
Microsoft.Maui.Controls.Build.Tasks (7)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Controls.Xaml (4)
Microsoft.Maui.Essentials (1)
Microsoft.Maui.Graphics (67)
PathF.cs (64)
86 return _operations[_operations.Count - 1] == PathOperation.Close;
108 yield return _operations[i];
117 yield return _points[i];
126 return _points[_points.Count - 1];
150 return _points[index];
185 if (_operations[_operations.Count - 1] == PathOperation.Close)
200 return _operations[aIndex];
207 return _arcAngles[aIndex];
227 return _arcClockwise[aIndex];
272 if (_operations[_operations.Count - 1] == PathOperation.Close)
435 var operation = _operations[operationIndex];
492 var type = _operations[s];
544 var segmentType = _operations[segment];
613 var segmentType = _operations[segment];
618 var points = new[] { _points[pointIndex] };
628 var points = new[] { _points[pointIndex] };
639 var points = new[] { _points[pointIndex++], _points[pointIndex] };
649 var points = new[] { _points[pointIndex++], _points[pointIndex++], _points[pointIndex] };
659 var points = new[] { _points[pointIndex++], _points[pointIndex] };
719 var segmentType = _operations[segment];
767 var segmentType = _operations[segment];
910 var startAngle = _arcAngles[arcIndex++];
911 var endAngle = _arcAngles[arcIndex++];
912 var clockwise = _arcClockwise[clockwiseIndex++];
927 var point = _points[pointIndex];
934 _points[i] = Vector2.Transform((Vector2)_points[i], transform);
958 path.MoveTo(_points[i++]);
962 path.LineTo(_points[i++]);
966 path.QuadTo(_points[i++], _points[i++]);
970 path.CurveTo(_points[i++], _points[i++], _points[i++]);
974 path.AddArc(_points[i++], _points[i++], _arcAngles[a++], _arcAngles[a++], _arcClockwise[c++]);
1006 if (operations[i] == PathOperation.Move)
1021 else if (operations[i] == PathOperation.Close)
1239 return _subPathsClosed[subPathIndex];
1278 _points[i] = _points[i].Offset(x, y);
1286 _points[index] = _points[index].Offset(dx, dy);
1299 var segmentType = _operations[i];
1306 var point = _points[i];
1315 var arcAngle = _arcAngles[i];
1325 var arcClockwise = _arcClockwise[i];
1356 var segmentType = _operations[i];
1363 var point = _points[i];
1372 var arcAngle = _arcAngles[i];
1382 var arcClockwise = _arcClockwise[i];
1465 var operation = _operations[i];
1469 flattenedPath.MoveTo(_points[pointIndex++]);
1472 flattenedPath.LineTo(_points[pointIndex++]);
1494 var topLeft = _points[pointIndex++];
1495 var bottomRight = _points[pointIndex++];
1527 var startPoint = _points[pointIndex - 1];
1528 var quadControlPoint = _points[pointIndex];
1529 var endPoint = _points[pointIndex + 1];
1606 var point = curvePoints[index];
Microsoft.Maui.Graphics.Skia (2)
Microsoft.ML.AutoML (2)
Microsoft.ML.CodeGenerator (4)
Microsoft.ML.CodeGenerator.Tests (2)
Microsoft.ML.Core (32)
Microsoft.ML.Core.Tests (12)
Microsoft.ML.Data (69)
Microsoft.ML.DataView (5)
Microsoft.ML.Ensemble (6)
Microsoft.ML.FastTree (46)
Microsoft.ML.LightGbm (3)
Microsoft.ML.Mkl.Components (4)
Microsoft.ML.OnnxConverter (2)
Microsoft.ML.OnnxTransformerTest (8)
Microsoft.ML.Parquet (2)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.ResultProcessor (11)
Microsoft.ML.Samples (24)
Microsoft.ML.SamplesUtils (2)
Microsoft.ML.StandardTrainers (6)
Microsoft.ML.Sweeper (8)
Microsoft.ML.TestFramework (7)
Microsoft.ML.Tests (23)
TrainerEstimators\TreeEstimators.cs (10)
566Assert.Equal(nativeResult0[j + i * _classNumber], mlnetPredictions[i].Score[j], 0.000001);
574Assert.Equal(prob / sum, mlnetPredictions[i].Score[j], 0.000001);
602Assert.Equal(nativeResult0[j + i * _classNumber], mlnetPredictions[i].Score[j], 0.000001);
610Assert.Equal(prob / sum, mlnetPredictions[i].Score[j], 0.000001);
644areEqual &= firstMlnetPredictions[i].Score[j].Equals(secondMlnetPredictions[i].Score[j]);
673Assert.Equal(nativeResult0[j + i * _classNumber], mlnetPredictions[i].Score[j], 0.000001);
679Assert.Equal(prob / sum, mlnetPredictions[i].Score[j], 0.000001);
702Assert.Equal(nativeResult0[j + i * _classNumber], mlnetPredictions[i].Score[j], 0.000001);
708Assert.Equal(prob / sum, mlnetPredictions[i].Score[j], 0.000001);
Microsoft.ML.TimeSeries (52)
Microsoft.ML.TimeSeries.Tests (39)
TimeSeriesDirectApi.cs (25)
141Assert.Equal(expectedValues[index++], row.Change[0]);
142Assert.Equal(expectedValues[index++], row.Change[1]);
143Assert.Equal(expectedValues[index++], row.Change[2]);
144Assert.Equal(expectedValues[index++], row.Change[3]);
198Assert.Equal(expectedValues[index++], row.Change[0], 0.0000001); // Alert
199Assert.Equal(expectedValues[index++], row.Change[1], 0.0000001); // Raw score
200Assert.Equal(expectedValues[index++], row.Change[2], 0.0000001); // P-Value score
201Assert.Equal(expectedValues[index++], row.Change[3], 0.0000001); // Martingale score
408Assert.Equal(expectedForecast[localIndex], row.Forecast[localIndex], 0.0000001);
409Assert.Equal(minCnf[localIndex], row.MinCnf[localIndex], 0.0000001);
410Assert.Equal(maxCnf[localIndex], row.MaxCnf[localIndex], 0.0000001);
662Assert.True(prediction.Prediction[6] > data[k].Value || data[k].Value > prediction.Prediction[5]);
714Assert.True(prediction.Prediction[6] <= data[index].Value);
715Assert.True(data[index].Value <= prediction.Prediction[5]);
821Assert.True(prediction.Prediction[6] > data[k].Value || data[k].Value > prediction.Prediction[5]);
826Assert.True(prediction.Prediction[6] <= data[k].Value);
827Assert.True(data[k].Value <= prediction.Prediction[5]);
879Assert.True(prediction.Prediction[6] > data[k].Value || data[k].Value > prediction.Prediction[5]);
884Assert.True(prediction.Prediction[6] <= data[k].Value);
885Assert.True(data[k].Value <= prediction.Prediction[5]);
911data[i].Value = -data[i].Value;
TimeSeriesSimpleApiTests.cs (14)
69Assert.Equal(expectedValues[index++], row.Data[0], 0.0000001);
70Assert.Equal(expectedValues[index++], row.Data[1], 0.0000001);
71Assert.Equal(expectedValues[index++], row.Data[2], 0.0000001);
72Assert.Equal(expectedValues[index++], row.Data[3], 0.0000001);
113CompareNumbersWithTolerance(expectedValues[index++], row.Data[0], digitsOfPrecision: 5); // Alert
114CompareNumbersWithTolerance(expectedValues[index++], row.Data[1], digitsOfPrecision: 5); // Raw score
115CompareNumbersWithTolerance(expectedValues[index++], row.Data[2], digitsOfPrecision: 5); // P-Value score
116CompareNumbersWithTolerance(expectedValues[index++], row.Data[3], digitsOfPrecision: 5); // Martingale score
164CompareNumbersWithTolerance(expectedValues[i][0], row.Data[0], digitsOfPrecision: 7);
165CompareNumbersWithTolerance(expectedValues[i][1], row.Data[1], digitsOfPrecision: 7);
166CompareNumbersWithTolerance(expectedValues[i][2], row.Data[2], digitsOfPrecision: 7);
222CompareNumbersWithTolerance(expectedValues[i][0], row.Data[0], digitsOfPrecision: 6);
223CompareNumbersWithTolerance(expectedValues[i][1], row.Data[1], digitsOfPrecision: 6);
224CompareNumbersWithTolerance(expectedValues[i][2], row.Data[2], digitsOfPrecision: 6);
Microsoft.ML.Tokenizers (75)
Model\SentencePieceUnigramModel.cs (24)
45if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.Types.Type.Normal ||
46modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.Types.Type.UserDefined ||
47modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.Types.Type.Unused)
49string piece = modelProto.Pieces[i].Piece;
50float score = modelProto.Pieces[i].Score;
51_vocabReverse[i] = (piece, score, modelProto.Pieces[i].Type);
56else if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.Types.Type.Byte)
60else if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.Types.Type.Unknown)
63_vocabReverse[i] = (modelProto.Pieces[i].Piece, modelProto.Pieces[i].Score, ModelProto.Types.SentencePiece.Types.Type.Unknown);
376EncodedToken temp = tokens[start];
377tokens[start] = tokens[end];
380int tokenLength = tokens[start].Offset.End.Value;
382tokens[start] = new EncodedToken(tokens[start].Id, tokens[start].Value, new Range(tokensOffset, tokensOffset + tokenLength));
391int tokenLength = tokens[start].Offset.End.Value;
393tokens[start] = new EncodedToken(tokens[start].Id, tokens[start].Value, new Range(tokensOffset, tokensOffset + tokenLength));
418if (tokens[insertionStartPosition].Id == UnknownId)
420int offsetStart = tokens[insertionStartPosition].Offset.Start.Value;
421int tokenLength = tokens[insertionStartPosition].Offset.End.Value - offsetStart;
745Debug.Assert(ids[IdsIndex] == UnknownId);
872if (ids[index] == UnknownId)
903charsConsumed += _vocabReverse[ids[index]].Piece.Length;
Microsoft.ML.Tokenizers.Tests (5)
Microsoft.ML.TorchSharp (44)
AutoFormerV2\AutoFormerV2Backbone.cs (6)
93inChannels: embedChannels[iLayer],
94outChannels: embedChannels[Math.Min(iLayer + 1, embedChannels.Count - 1)],
95depth: depths[iLayer],
96numHeads: numHeads[iLayer],
97windowSize: windowSizes[iLayer],
150var res = xOut.view(n, h, w, this.numFeatures[iLayer]).permute(0, 3, 1, 2).contiguous();
Microsoft.ML.Transforms (40)
Microsoft.Net.Http.Headers (1)
Microsoft.NET.StringTools (15)
Microsoft.NET.StringTools.net35 (1)
Microsoft.VisualBasic.Core (12)
Microsoft.VisualStudio.LanguageServices (31)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.Implementation (1)
MSBuild (1)
Pipelines.AppHost (2)
PresentationBuildTasks (14)
PresentationCore (532)
PresentationFramework (792)
MS\Internal\Documents\TextBoxView.cs (78)
505return _visualChildren[index];
646int startOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, startPosition.Offset);
647int endOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, endPosition.Offset);
665bool firstLinePartiallyCovered = _lineMetrics[firstLineIndex].Offset < startOffset ||
666_lineMetrics[firstLineIndex].EndOffset > endOffset;
667bool lastLinePartiallyCovered = _lineMetrics[lastLineIndex].Offset < startOffset ||
668_lineMetrics[lastLineIndex].EndOffset > endOffset;
690double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
691Rect rect = new Rect(contentOffset, lineIndex * _lineHeight, _lineMetrics[lineIndex].Width, _lineHeight);
694ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].EndOffset, LogicalDirection.Backward);
734nextLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex + linesMoved].Offset, LogicalDirection.Forward);
780if (position.Offset > _lineMetrics[lineIndex].Offset)
839if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].EndOffset &&
853else if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset &&
902if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset)
935ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset, LogicalDirection.Forward);
936ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength, LogicalDirection.Forward);
1056int lastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1068int newLastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1140LineRecord record = _lineMetrics[index];
1259ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[_lineMetrics.Count - 1].EndOffset, LogicalDirection.Forward);
1528LineRecord metrics = _lineMetrics[lineIndex];
1618LineRecord record = _lineMetrics[index];
1685LineRecord metrics = _lineMetrics[lineIndex];
1838LineRecord metrics = _lineMetrics[lineIndex];
1915if (_visualChildren[i] == null || _visualChildren[i].DiscardOnArrange)
1917RemoveVisualChild(_visualChildren[i]);
1921_visualChildren[i] = _visualChildren[j];
1953RemoveVisualChild(_visualChildren[i]);
2000int startOffset = Math.Max(_lineMetrics[lineIndex].Offset, unclippedStartOffset);
2001int endOffset = Math.Min(_lineMetrics[lineIndex].EndOffset, unclippedEndOffset);
2008if (unclippedStartOffset == _lineMetrics[lineIndex].EndOffset)
2034Invariant.Assert(endOffset == _lineMetrics[lineIndex].Offset ||
2035endOffset == _lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength);
2053if (unclippedEndOffset >= _lineMetrics[lineIndex].EndOffset)
2059double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
2060Rect rect = new Rect(contentOffset + _lineMetrics[lineIndex].Width, lineIndex * _lineHeight, endOfParaGlyphWidth, _lineHeight);
2086int lineStartOffset = _lineMetrics[lineIndex].Offset;
2087int lineEndOffset = _lineMetrics[lineIndex].EndOffset;
2104if (unclippedStartOffset == _lineMetrics[lineIndex].EndOffset)
2116Invariant.Assert(endOffset == _lineMetrics[lineIndex].Offset ||
2117endOffset == _lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength);
2132if (unclippedEndOffset >= _lineMetrics[lineIndex].EndOffset)
2138double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
2139Rect rect = new Rect(contentOffset + _lineMetrics[lineIndex].Width, 0, endOfParaGlyphWidth, _lineHeight);
2194lineOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2284if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2304if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2345_lineMetrics[i].Offset += delta;
2362lineOffset = _lineMetrics[lineIndex].Offset;
2402if (endOffset > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2405endOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2419_lineMetrics[i].Offset += delta;
2436lineOffset = _lineMetrics[lineIndex].Offset;
2446(range.StartIndex > lineOffset || range.StartIndex + -delta < _lineMetrics[lineIndex].EndOffset))
2479int originalEndOffset = _lineMetrics[lineIndex].EndOffset;
2480lineOffset = _lineMetrics[lineIndex].Offset;
2493if (originalEndOffset != _lineMetrics[lineIndex].EndOffset)
2512lineOffset != _lineMetrics[lineIndex].Offset))
2515lineOffset >= _lineMetrics[lineIndex].EndOffset)
2534lineOffset + line.Length <= _lineMetrics[lineIndex].Offset)
2548Invariant.Assert(lineOffset < _lineMetrics[lineIndex].EndOffset);
2550var curLine = _lineMetrics[lineIndex];
2602desiredSize.Width = Math.Max(desiredSize.Width, _lineMetrics[i].Width);
2670_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex + i] = oldLineVisuals[lineIndex - oldLineVisualsIndex + i];
2677oldLineVisuals[i]?.DiscardOnArrange = true;
2682oldLineVisuals[i]?.DiscardOnArrange = true;
2699lineVisual = _viewportLineVisuals[lineIndex - _viewportLineVisualsIndex];
2733_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex] != null)
2736_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex].DiscardOnArrange = true;
2763_viewportLineVisuals[start + i]?.DiscardOnArrange = true;
2865_lineMetrics[_lineMetrics.Count - 1].EndOffset >= position.Offset;
2926int viewportStart = _lineMetrics[firstLineIndex].Offset;
2927int viewportEnd = _lineMetrics[lastLineIndex].EndOffset;
MS\Internal\PtsHost\PtsCache.cs (46)
184if (!_contextPool[index].InUse &&
185_contextPool[index].IsOptimalParagraphEnabled == ptsContext.IsOptimalParagraphEnabled)
196_contextPool[index].IsOptimalParagraphEnabled = ptsContext.IsOptimalParagraphEnabled;
197_contextPool[index].PtsHost = new PtsHost();
198_contextPool[index].PtsHost.Context = CreatePTSContext(index, textFormattingMode);
204if (_contextPool[index].IsOptimalParagraphEnabled)
206ptsContext.TextFormatter = _contextPool[index].TextFormatter;
210_contextPool[index].InUse = true;
211_contextPool[index].Owner = new WeakReference(ptsContext);
213return _contextPool[index].PtsHost;
253if (_contextPool[index].PtsHost == ptsHost)
259PTS.Validate(PTS.GetFloaterHandlerInfo(ref _contextPool[index].FloaterInit, pobjectinfo));
272if (_contextPool[index].PtsHost == ptsHost)
278PTS.Validate(PTS.GetTableObjHandlerInfo(ref _contextPool[index].TableobjInit, pobjectinfo));
313PtsContext ptsContext = _contextPool[index].Owner.Target as PtsContext;
316Invariant.Assert(_contextPool[index].PtsHost.Context == ptsContext.Context, "PTS Context mismatch.");
317_contextPool[index].Owner = new WeakReference(null);
318_contextPool[index].InUse = false;
324if (!_contextPool[index].InUse)
329Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid.");
330PTS.IgnoreError(PTS.DestroyDocContext(_contextPool[index].PtsHost.Context));
331Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid.");
332PTS.IgnoreError(PTS.DestroyInstalledObjectsInfo(_contextPool[index].InstalledObjects));
335_contextPool[index].TextPenaltyModule?.Dispose();
375if (_contextPool[index].PtsHost.Context == ptsContext.Context)
377_contextPool[index].Owner = new WeakReference(null);
378_contextPool[index].InUse = false;
399if (!_contextPool[index].InUse)
401Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid.");
402PTS.Validate(PTS.DestroyDocContext(_contextPool[index].PtsHost.Context));
403Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid.");
404PTS.Validate(PTS.DestroyInstalledObjectsInfo(_contextPool[index].InstalledObjects));
407_contextPool[index].TextPenaltyModule?.Dispose();
429ptsHost = _contextPool[index].PtsHost;
433InitInstalledObjectsInfo(ptsHost, ref _contextPool[index].SubtrackParaInfo, ref _contextPool[index].SubpageParaInfo, out installedObjects, out installedObjectsCount);
434_contextPool[index].InstalledObjects = installedObjects;
437InitGenericInfo(ptsHost, (IntPtr)(index + 1), installedObjects, installedObjectsCount, ref _contextPool[index].ContextInfo);
440InitFloaterObjInfo(ptsHost, ref _contextPool[index].FloaterInit);
441InitTableObjInfo(ptsHost, ref _contextPool[index].TableobjInit);
444if (_contextPool[index].IsOptimalParagraphEnabled)
450_contextPool[index].TextPenaltyModule = penaltyModule;
451_contextPool[index].ContextInfo.ptsPenaltyModule = ptsPenaltyModule;
452_contextPool[index].TextFormatter = TextFormatter.CreateFromContext(textFormatterContext, textFormattingMode);
458GC.SuppressFinalize(_contextPool[index].TextPenaltyModule);
462PTS.Validate(PTS.CreateDocContext(ref _contextPool[index].ContextInfo, out context));
System\Windows\Controls\DataGridCellsPanel.cs (27)
176RealizedColumnsBlock rcb = blockList[i];
188RealizedColumnsBlock nextRcb = blockList[i + 1];
194measureWidth += GetColumnEstimatedMeasureWidthSum(blockList[blockList.Count - 1].EndIndex + 1, parentDataGrid.Columns.Count - 1, averageColumnWidth);
470if (indexList[i] != indexList[i - 1] + 1)
474resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i - 1], 0));
478RealizedColumnsBlock lastRealizedColumnsBlock = resultList[resultList.Count - 1];
480resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i - 1], startIndexOffset));
483startIndex = indexList[i];
490resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i], 0));
494RealizedColumnsBlock lastRealizedColumnsBlock = resultList[resultList.Count - 1];
496resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i], startIndexOffset));
758UIElement child = _realizedChildren[realizedChildIndex];
998if (realizedColumnDisplayIndices[displayIndexListIterator] == displayIndex)
1002else if (realizedColumnDisplayIndices[displayIndexListIterator] > displayIndex)
1036RealizedColumnsBlock block = (blockCount > 0 ? blockList[blockIndex] : new RealizedColumnsBlock(-1, -1, -1));
1186realizedChild = _realizedChildren[realizedIndex];
1326RealizedColumnsBlock lastBlock = blockList[blockList.Count - 1];
1327RealizedColumnsBlock lastDisplayIndexBlock = displayIndexBlockList[displayIndexBlockList.Count - 1];
1389j < additionalChildrenCount && additionalChildIndices[j] <= childIndex; j++)
1417UIElement child = children[additionalChildIndices[i]] as UIElement;
1536RealizedColumnsBlock block = blockList[i];
1554RealizedColumnsBlock lastBlock = blockList[blockList.Count - 1];
1574RealizedColumnsBlock block = blockList[blockIndex++];
1601block = blockList[blockIndex++];
1639RealizedColumnsBlock block = blockList[j];
1648int childColumnIndex = (displayIndex < 0 ? -1 : displayIndexMap[displayIndex]);
System\Windows\StyleHelper.cs (9)
2224DependencyObject walk = templateChain[i];
2255DependencyObject walk = templateChain[i];
2519TriggerAction action = actionsList[i];
3522if (dictionaries[i].HasImplicitStyles)
4347InvokePropertyTriggerActions( triggerList[i], container, dp, changedArgs, sourceChildIndex,
4798InvokeActions(actionList[i].TriggerBase,
4799triggerContainer, actionList[i].TriggerActionCollection,
5277InvokeDataTriggerActions( triggerList[i], container, binding, e,
5434DependencyObject child = styledChildren[childIndex - 1];
PresentationFramework.Aero (2)
PresentationFramework.Aero2 (2)
PresentationFramework.AeroLite (2)
PresentationFramework.Classic (2)
PresentationFramework.Luna (2)
PresentationFramework.Royale (2)
QuarantineTools.Tests (4)
ReachFramework (75)
AlphaFlattener\Flattener.cs (48)
308PrimitiveInfo info = commands[i];
341DisplayList.PrintPrimitive(commands[i], i, true);
360commands[i]?.SetID(i);
370PrimitiveInfo info = commands[i];
422PrimitiveInfo pi = _dl.Commands[i];
428_dl.Commands[j].underlay.Remove(i);
440_dl.Commands[j].overlapHasTransparency--;
443_dl.Commands[j].overlap.Remove(i);
557commands[k].underlay.Remove(i);
558commands[k].underlay.Add(j);
566commands[k].overlap.Remove(i);
567commands[k].overlap.Add(j);
578commands[k].underlay.Remove(j);
579commands[k].underlay.Add(i);
587commands[k].overlap.Remove(j);
588commands[k].overlap.Add(i);
607PrimitiveInfo pj = commands[j];
618int i = pj.underlay[n];
620PrimitiveInfo pi = commands[i];
641SwitchCommands(commands, i, commands[i], i + 1, commands[i + 1], false);
661PrimitiveInfo pi = commands[i];
671qi = commands[pi.underlay[pi.underlay.Count - 1]];
735commands[pi.underlay[k]].overlapHasTransparency--;
762PrimitiveInfo qi = commands[pi.underlay[j]];
768int under = pi.underlay[k];
770commands[under].overlap.Remove(i);
771commands[under].overlapHasTransparency--;
788List<int> l = commands[i].underlay;
796oldUnderlay[i].Add(l[j]);
829PrimitiveInfo pi = commands[i];
841PrimitiveInfo qi = commands[pi.overlap[j]];
863PrimitiveInfo pj = commands[j];
867if ((pj.underlay[pj.underlay.Count - 1] == i) && pj.FullyCovers(pi) && !pi.FullyCovers(pj))
902PrimitiveInfo pi = commands[i];
919commands[j].underlay.Remove(i);
930commands[j].overlap.Remove(i);
973PrimitiveInfo pi = commands[i];
982DisplayList.PrintPrimitive(commands[i], i, false);
997DisplayList.LeftPad(transparentCluster[i].DebugBounds, 0),
998DisplayList.LeftPad(transparentCluster[i].DebugPrimitives, 0),
999transparentCluster[i].DebugRasterize);
1022PrimitiveInfo pi = commands[i];
1047ctx.DrawRectangle(null, pen, transparentCluster[i].DebugBounds);
Replay (1)
Roslyn.Diagnostics.Analyzers (28)
Roslyn.Diagnostics.CSharp.Analyzers (4)
Roslyn.VisualStudio.DiagnosticsWindow (1)
RunTests (1)
Stress.ApiService (2)
Swaggatherer (11)
System.CodeDom (2)
System.Collections (1)
System.Collections.Concurrent (1)
System.Collections.Immutable (6)
System.ComponentModel.Annotations (1)
System.ComponentModel.Composition (2)
System.ComponentModel.TypeConverter (31)
System.Configuration.ConfigurationManager (4)
System.Console (2)
System.Data.Common (44)
System.Data.Odbc (8)
System.Diagnostics.DiagnosticSource (5)
System.Diagnostics.Process (1)
System.Diagnostics.TraceSource (8)
System.Drawing.Common (3)
System.Formats.Cbor (1)
System.Formats.Nrbf (5)
System.IO.FileSystem.Watcher (1)
System.IO.Packaging (26)
System.IO.Pipelines (1)
System.Linq (5)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (19)
System.Linq.Parallel (14)
System.Net.Http (14)
System.Net.HttpListener (3)
System.Net.Mail (1)
System.Net.NetworkInformation (5)
System.Net.Primitives (2)
System.Net.Quic (2)
System.Net.Requests (3)
System.Net.Security (4)
System.ObjectModel (3)
System.Private.CoreLib (29)
System.Private.DataContractSerialization (61)
System.Private.Windows.Core (2)
System.Private.Xml (92)
System.Reflection.DispatchProxy (3)
System.Reflection.Emit (20)
System.Reflection.Metadata (27)
System.Security.Claims (13)
System.Security.Cryptography (20)
System.Security.Cryptography.Pkcs (8)
System.ServiceModel.NetFramingBase (12)
System.ServiceModel.Primitives (67)
System.ServiceModel.Primitives.Tests (1)
System.ServiceModel.Syndication (1)
System.Text.Json (17)
System.Text.Json.SourceGeneration (4)
System.Text.RegularExpressions (76)
System.Text.RegularExpressions.Generator (57)
System.Threading.Tasks.Dataflow (10)
System.Windows.Controls.Ribbon (32)
System.Windows.Forms (237)
System.Windows.Forms.Design (113)
System.Windows.Forms.Primitives (8)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (10)
System.Xaml (42)
Test.Utilities (21)
Text.Analyzers (28)
UIAutomationClientSideProviders (6)
VBCSCompiler (3)
Wasm.Performance.TestApp (1)
WindowsBase.Tests (24)
System\Windows\WeakEventManagerTests.cs (24)
1209manager.ProtectedAddHandler(source, handlers[i]);
1215Assert.Same(handlers[j].Target, list[j]);
1575manager.ProtectedAddListener(source, listeners[i]);
1581Assert.Same(listeners[j], list[j]);
2092manager.ProtectedAddHandler(source, handlers[i]);
2096manager.ProtectedRemoveHandler(source, handlers[removeIndex]);
2107Assert.Same(expectedHandlers[i].Target, list[i]);
2118manager.ProtectedRemoveHandler(source, expectedHandlers[i]);
2517manager.ProtectedAddListener(source, listeners[i]);
2521manager.ProtectedRemoveListener(source, listeners[removeIndex]);
2532Assert.Equal(expectedListeners[i], list[i]);
2543manager.ProtectedRemoveListener(source, expectedListeners[i]);
3575list.Add(listeners[i]);
3580Assert.Same(listeners[j], list[j]);
3896list.AddHandler(handlers[i]);
3901Assert.Same(handlers[j].Target, list[j]);
5351list.Add(listeners[i]);
5355list.Remove(listeners[removeIndex]);
5363Assert.Equal(expectedListeners[i], list[i]);
5369list.Remove(expectedListeners[i]);
5610list.AddHandler(handlers[i]);
5614list.RemoveHandler(handlers[removeIndex]);
5622Assert.Same(expectedHandlers[i].Target, list[i]);
5628list.RemoveHandler(expectedHandlers[i]);
WindowsFormsIntegration (3)
WinFormsControlsTest (4)
xunit.assert (2)