31 references to TryParse
ClientSample (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
CustomPolicyProvider (1)
Authorization\MinimumAgeAuthorizeAttribute.cs (1)
27if (int.TryParse(Policy.AsSpan(POLICY_PREFIX.Length), out var age))
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-getdocument (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-openapi (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-user-jwts (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
illink (2)
LargeResponseApp (1)
Startup.cs (1)
26if (!path.HasValue || !int.TryParse(path.Value.AsSpan(1), out var numChunks))
Microsoft.AspNetCore.HttpOverrides (1)
IPNetwork.cs (1)
199if (!int.TryParse(networkSpan.Slice(forwardSlashIndex + 1), out prefixLength))
Microsoft.AspNetCore.Routing (2)
Matching\HostMatcherPolicy.cs (2)
131else if (port.Length > 0 && (!int.TryParse(port, out var parsed) || parsed != requestPort)) 171if (int.TryParse(hostSpan[hostParts[1]], out var port))
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Microsoft.Extensions.Configuration (2)
ConfigurationKeyComparer.cs (2)
73bool aIsInt = int.TryParse(a, out int value1); 74bool bIsInt = int.TryParse(b, out int value2);
Swaggatherer (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
70valueParsed = 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 (3)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
70valueParsed = int.TryParse(value, out results.Pid);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (2)
769if (int.TryParse(offset, out hours)) 873if (int.TryParse(date, out int julianDay) && julianDay < 59)
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContract.cs (1)
1912if (!int.TryParse(format.AsSpan(start, i - start), out int paramIndex) || paramIndex < 0 || paramIndex >= genericNameProvider.GetParameterCount())
Templates.Blazor.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Templates.Mvc.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Templates.Tests (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\CommandLine\AnsiConsole.cs (1)
98if (int.TryParse(message.AsSpan(startIndex, endIndex - startIndex), out value))