34 references to TryParse
Aspire.Dashboard (1)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
472if (dotIndex > 0 && int.TryParse(remainder.Slice(0, dotIndex), out var messageIndex))
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppExtensions.cs (1)
233int.TryParse(
dotnet-dev-certs (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-getdocument (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-openapi (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-user-jwts (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-user-secrets (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
GetDocument.Insider (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
ILCompiler.Compiler (2)
Compiler\DependencyAnalysis\PInvokeMethodFixupNode.cs (1)
65if (!int.TryParse(entryPointName.AsSpan(1), out entrypointOrdinal))
Compiler\Logging\UnconditionalSuppressMessageAttributeState.cs (1)
190!int.TryParse(warningId.AsSpan(2, 4), out info.Id))
illink (2)
Microsoft.AspNetCore.HttpOverrides (1)
IPNetwork.cs (1)
202if (!int.TryParse(networkSpan.Slice(forwardSlashIndex + 1), out prefixLength))
Microsoft.AspNetCore.Routing (2)
Matching\HostMatcherPolicy.cs (2)
140else if (port.Length > 0 && (!int.TryParse(port, out var parsed) || parsed != requestPort)) 180if (int.TryParse(hostSpan[hostParts[1]], out var port))
Microsoft.Build (1)
BackEnd\Components\Logging\BuildErrorTelemetryTracker.cs (1)
280return int.TryParse(digits, out errorNumber);
Microsoft.Build.Tasks.Core (2)
BootstrapperUtil\Util.cs (1)
139if (Int32.TryParse(visualStudioVersion.AsSpan(0, dotIndex), out int majorVersion) && (majorVersion < 11))
WriteCodeFragment.cs (1)
230if (!Int32.TryParse(
Microsoft.Extensions.Configuration (2)
ConfigurationKeyComparer.cs (2)
73bool aIsInt = int.TryParse(a, out int value1); 74bool bIsInt = int.TryParse(b, out int value2);
System.Data.Odbc (1)
System\Data\Odbc\OdbcParameterCollectionHelper.cs (1)
325&& int.TryParse(lastParameter.ParameterName.AsSpan(ADP.Parameter.Length), out int lastIndex))
System.Diagnostics.Process (1)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
92valueParsed = int.TryParse(value, out results.Pid);
System.Net.HttpListener (1)
System\Net\Managed\HttpEndPointManager.cs (1)
89if (!int.TryParse(portString, out port) || port is <= 0 or >= 65536)
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Misc.cs (1)
104if (!int.TryParse(ReadAllText(filePath).AsSpan().Trim(), out ret))
System.Private.CoreLib (6)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
92valueParsed = int.TryParse(value, out results.Pid);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (5)
794if (int.TryParse(offset, out hours)) 898if (int.TryParse(date, out int julianDay) && julianDay < 59) 987if (int.TryParse(dateRule.Slice(1, monthWeekDotIndex - 1), out month) && 988int.TryParse(weekDaySpan.Slice(0, weekDayDotIndex), out week) && 989int.TryParse(weekDaySpan.Slice(weekDayDotIndex + 1), out int day))
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContract.cs (1)
1937if (!int.TryParse(format.AsSpan(start, i - start), out int paramIndex) || paramIndex < 0 || paramIndex >= genericNameProvider.GetParameterCount())
System.Windows.Forms (2)
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (1)
49int.TryParse(s.AsSpan(rgbs[i]), out rgb[i]);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
278if (int.TryParse(versionInfo.ProductVersion.AsSpan(0, 1), out int parsedValue))