Base:
method
ToString
System.ValueType.ToString()
329 references to ToString
Aspire.Azure.Npgsql (1)
src\Components\Common\ManagedIdentityTokenCredentialHelpers.cs (1)
133return principalName.ToString();
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (1)
src\Components\Common\ManagedIdentityTokenCredentialHelpers.cs (1)
133return principalName.ToString();
Aspire.Dashboard (4)
ConsoleLogs\AnsiParser.cs (1)
437url = urlSpan[(argsEndPosition + 1)..].ToString();
Otlp\Model\OtlpUnits.cs (2)
147_ => unit.ToString(), 164_ => perUnit.ToString(),
src\Shared\ConsoleLogs\TimestampParser.cs (1)
37result = new(content.ToString(), DateTimeOffset.Parse(match.ValueSpan, CultureInfo.InvariantCulture));
Aspire.Hosting (2)
Exec\ExecResourceManager.cs (1)
235var commandUnwrapped = command.AsSpan(1, command.Length - 2).ToString();
src\Shared\ConsoleLogs\TimestampParser.cs (1)
37result = new(content.ToString(), DateTimeOffset.Parse(match.ValueSpan, CultureInfo.InvariantCulture));
Aspire.Hosting.Azure (2)
src\Shared\BicepFunction2.cs (2)
42bicepStringBuilder.Append(span[..(match.Index - skip)].ToString()); 72bicepStringBuilder.Append(span.ToString());
Aspire.Hosting.Azure.AppContainers (2)
src\Shared\BicepFunction2.cs (2)
42bicepStringBuilder.Append(span[..(match.Index - skip)].ToString()); 72bicepStringBuilder.Append(span.ToString());
Aspire.Hosting.Azure.AppService (2)
src\Shared\BicepFunction2.cs (2)
42bicepStringBuilder.Append(span[..(match.Index - skip)].ToString()); 72bicepStringBuilder.Append(span.ToString());
GenerateDocumentationAndConfigFiles (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
InMemory.FunctionalTests (2)
BadHttpRequestTests.cs (2)
594line = line.AsSpan().Slice(0, nullIndex + 2).ToString(); 606var printableTarget = target.AsSpan().Slice(0, target.IndexOf('\0') + 1).ToString();
Metrics (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Metrics.Legacy (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.AspNetCore.Components (3)
Routing\Router.cs (1)
279_updateScrollPositionForHashLastLocation = relativePath.ToString();
Routing\UrlValueConstraint.cs (2)
37result = str.ToString(); 124throw new InvalidOperationException($"Cannot parse the value '{value.ToString()}' as type '{typeof(T)}' for '{destinationNameForMessage}'.");
Microsoft.AspNetCore.Http (2)
Features\QueryFeature.cs (2)
126=> Append(key.ToString(), value.ToString());
Microsoft.AspNetCore.InternalTesting (2)
AssemblyTestLog.cs (2)
135testName = string.Concat(testName.AsSpan(0, testNameLength / 2).ToString(), testName.AsSpan(testName.Length - testNameLength / 2, testNameLength / 2).ToString());
Microsoft.AspNetCore.Localization (2)
CookieRequestCultureProvider.cs (2)
108return new ProviderCultureResult(cultureName.ToString(), uiCultureName.ToString());
Microsoft.AspNetCore.Mvc.Razor (1)
TagHelpers\UrlResolutionTagHelper.cs (1)
334return (key.ToString(), keyEnd);
Microsoft.AspNetCore.Rewrite (2)
ApacheModRewrite\FlagParser.cs (2)
77if (!_ruleFlagLookup.TryGetValue(tokenSpan[hasPayload[0]].ToString(), out flag)) 84flags.SetFlag(flag, tokenSpan[hasPayload[1]].ToString());
Microsoft.AspNetCore.Routing (3)
Matching\HostMatcherPolicy.cs (3)
164return new EdgeKey(hostSpan[hostParts[0]].ToString(), null); 173return new EdgeKey(hostSpan[hostParts[0]].ToString(), port); 177return new EdgeKey(hostSpan[hostParts[0]].ToString(), null);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Http1\Http1ConnectionTests.cs (3)
497var partialTarget = target.AsSpan(0, target.IndexOf('\0') + 1).ToString(); 514var partialRequestLine = requestLine.AsSpan(0, requestLine.IndexOf('\0') + 1).ToString(); 531var partialTarget = target.AsSpan(0, target.IndexOf('\0') + 1).ToString();
HttpParserTests.cs (2)
94line = line.AsSpan().Slice(0, nullIndex + 2).ToString(); 146var line = method.AsSpan().Slice(0, nullIndex + 1).ToString();
Microsoft.AspNetCore.WebUtilities (1)
MultipartReaderStream.cs (1)
237Debug.Assert(stream.FinalBoundaryFound || remainder.IsEmpty, "Un-expected data found on the boundary line: " + remainder.ToString());
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Microsoft.CodeAnalysis (2)
InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.Analyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
69sb.AppendLine(commentText.ToString()); 78var triviaStringParts = commentText.Span.Trim().ToString().Replace("\r\n", "\n").Split('\n');
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.CSharp (6)
CommandLine\CSharpCommandLineParser.cs (2)
190string? valueMemoryString() => valueMemory is { } m ? m.Span.ToString() : null; 250string name = nameMemory.Span.ToString().ToLowerInvariant();
CSharpParseOptions.cs (2)
218singleNamespaceBuilder.Add(@namespace.Slice(currentIndex, dotIndex - currentIndex).ToString()); 221singleNamespaceBuilder.Add(@namespace.Slice(currentIndex).ToString());
Parser\LanguageParser_InterpolatedString.cs (2)
160return SyntaxFactory.InterpolatedStringText(MakeInterpolatedStringTextToken(kind, text.ToString())); 227var textString = text.ToString();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (2)
69sb.AppendLine(commentText.ToString()); 78var triviaStringParts = commentText.Span.Trim().ToString().Replace("\r\n", "\n").Split('\n');
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Microsoft.Extensions.AI.Abstractions (1)
Contents\DataUriParser.cs (1)
126mediaType ??= mediaTypeSpan.ToString();
Microsoft.Extensions.Caching.Abstractions (1)
Hybrid\HybridCache.cs (1)
88=> GetOrCreateAsync(key.ToString(), state, factory, options, tags, cancellationToken);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.TagInvalidation.cs (1)
107return IsTagExpired(tag.ToString(), timestamp, out isPending);
Internal\HybridCachePayload.cs (1)
289pendingTagBuffer[pendingTagsCount++] = tagString ?? stringSpan.ToString();
Microsoft.Extensions.Compliance.Abstractions (3)
Classification\DataClassificationTypeConverter.cs (2)
103taxonomyName = valueSpan.Slice(0, index).ToString(); 104taxonomyValue = valueSpan.Slice(index + 1).ToString();
Redaction\Redactor.cs (1)
251var fmt = format.Length > 0 ? format.ToString() : string.Empty;
Microsoft.Extensions.Compliance.Testing (2)
FakeRedactor.cs (2)
76var sourceString = source.ToString(); 92return string.Format(CultureInfo.InvariantCulture, _format, input.ToString()).Length;
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Linux\LinuxUtilizationParserCgroupV2.cs (1)
135_cachedCgroupPath = "/sys/fs/cgroup" + trimmedPath.ToString().TrimEnd('/') + "/";
Linux\Network\LinuxNetworkUtilizationParser.cs (2)
93var state = (LinuxTcpState)Convert.ToInt32(tcpConnectionState.ToString(), Base16); 153Throw.InvalidOperationException($"Could not parse '{file}'. We expected first line of the file to start with '{Sl}' but it was '{firstLine.ToString()}' instead.");
Microsoft.Extensions.Http.Diagnostics (1)
Http\DownstreamDependencyMetadataManager.cs (1)
127route = routeSpan.ToString();
Microsoft.Extensions.Telemetry (5)
Http\HttpRouteParser.cs (4)
257HttpRouteParameterRedactionMode.None => httpPath.Slice(startIndex, length).ToString(), 282return httpPathAsSpan.Slice(startIndex, length).ToString(); 287return httpPathAsSpan.Slice(startIndex, length).ToString(); 312return httpPathAsSpan.Slice(startIndex, length).ToString();
Logging\JustInTimeRedactor.cs (1)
114inputAsSpan = f.ToString(format.Length > 0 ? format.ToString() : string.Empty, formatProvider).AsSpan();
Microsoft.Gen.Logging.Generated.Tests (2)
SimpleRedactors.cs (2)
23return source!.ToString()!.Length; 28var len = source!.ToString()!.Length;
Microsoft.Maui.Essentials (2)
Types\Shared\WebUtils.shared.cs (2)
58 name = segment.Slice(0, equalIndex).ToString(); 70 name = segment.ToString();
Microsoft.Maui.Graphics.Skia (1)
SkiaTextLayout.cs (1)
246 lines.Add(new TextLine(line.ToString(), textWidth));
Microsoft.ML.Core (2)
Utilities\LineParser.cs (2)
40if (float.TryParse(valuesToParse.Slice(toParseStartIndex, i - toParseStartIndex).ToString(), out float parsed)) 50return (true, trimmedLine.Slice(0, firstSeparatorIndex).ToString(), values);
Microsoft.ML.Tokenizers (20)
Model\BPETokenizer.cs (3)
1352Cache.Set(textSpan.ToString(), word); 1468Cache.Set(textSpan.ToString(), word); 1549Cache.Set(textSpan.ToString(), word);
Model\CodeGenTokenizer.cs (3)
468_cache.Set(text is null ? textSpan.ToString() : text, result); 1152_cache.Set(text ?? textSpan.ToString(), result); 1216_cache.Set(text ?? textSpan.ToString(), result);
Model\EnglishRobertaTokenizer.cs (3)
394_cache.Set(text.ToString(), result); 700_cache.Set(text.ToString(), result); 745_cache.Set(text.ToString(), result);
Model\SentencePieceBpeModel.cs (2)
272tokens.Add(new EncodedToken(id.Id, text.Slice(pieceSpan.Index, pieceSpan.Length).ToString(), new Range(pieceSpan.Index, pieceSpan.Index + pieceSpan.Length))); 1218=> _vocabReverse.TryGetValue(id, out string? token) ? token : text.Slice(index, length).ToString();
Model\TiktokenTokenizer.cs (6)
309value[i].TokenLength == 0 ? string.Empty : text.Slice(value[i].TokenIndex, value[i].TokenLength).ToString(), 339string textAsString = text.ToString(); 350encodedTokens[i].TokenLength == 0 ? string.Empty : text.Slice(encodedTokens[i].TokenIndex, encodedTokens[i].TokenLength).ToString(), 457string textAsString = text.ToString(); 622string textAsString = text.ToString(); 748string textAsString = text.ToString();
Normalizer\BertNormalizer.cs (1)
133return Normalize(original.ToString());
Tokenizer.cs (1)
445normalizedText = normalizer.Normalize(textSpan.ToString());
Utils\StringSpanOrdinalKey.cs (1)
38public override string ToString() => Data ?? Span.ToString();
Microsoft.ML.Tokenizers.Tests (3)
NormalizerTests.cs (2)
87return original.ToString(); 158return original.ToString().Normalize(_normalizationForm);
UnigramTests.cs (1)
551Assert.Equal(decodedString.AsSpan().Slice(0, charsWritten).ToString(), buffer.AsSpan().Slice(0, charsWritten).ToString());
Microsoft.NET.StringTools (1)
InternableString.cs (1)
229return _inlineSpan.ToString();
Microsoft.VisualStudio.LanguageServices (1)
Workspace\SourceGeneratedFileManager.cs (1)
185return Guid.TryParse(guidDirName.ToString(), out var guid) &&
PresentationCore (2)
System\Windows\Input\Command\MouseActionConverter.cs (1)
70_ => throw new NotSupportedException(SR.Format(SR.Unsupported_MouseAction, mouseActionToken.ToString()))
System\Windows\Media\CharacterMetrics.cs (1)
165throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, field.ToString(), "double"));
PresentationFramework (9)
Microsoft\Win32\FileDialog.cs (1)
735extensions.Add(exts[ext].Slice(i + 1).ToString());
System\Windows\Annotations\Annotation.cs (3)
642_typeName = new XmlQualifiedName(name.ToString()); 653_typeName = new XmlQualifiedName(name.ToString(), reader.LookupNamespace(@namespace.ToString()));
System\Windows\Controls\VirtualizingStackPanel.cs (1)
12004_fileName = traceSplits[splitRegions[0]].ToString();
System\Windows\Documents\FixedSchema.cs (1)
444return new string[] { attrValueSpan.Slice(0, spacePos).ToString() };
System\Windows\Documents\TextStore.cs (1)
4666_fileName = traceSplits[splitRegions[0]].ToString();
System\Windows\LengthConverter.cs (1)
225throw new FormatException(SR.Format(SR.LengthFormatError, span.ToString()));
System\Windows\SystemResources.cs (1)
570_assemblyName = ReflectionUtils.GetAssemblyPartialName(assembly).ToString();
Replay (3)
Replay.cs (2)
241var argValue = line.AsSpan().Slice(index + 1).ToString(); 260var argName = line.AsSpan().Slice(0, index).ToString();
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
Roslyn.Diagnostics.Analyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
System.ComponentModel.TypeConverter (9)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (3)
97return Convert.ToInt32(text.Slice(1).ToString(), 16); 101return Convert.ToInt32(text.Slice(2).ToString(), 16); 112throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text.ToString(), nameof(Int32)), e);
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
112className = _tabClassNames[i].AsSpan(0, commaIndex).Trim().ToString(); 113assemblyName = _tabClassNames[i].AsSpan(commaIndex + 1).Trim().ToString();
System\Drawing\PointConverter.cs (1)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y"));
System\Drawing\RectangleConverter.cs (1)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y{sep} width{sep} height"));
System\Drawing\SizeConverter.cs (1)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height"));
System\Drawing\SizeFConverter.cs (1)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height"));
System.Data.Common (2)
System\Data\DataTable.cs (2)
3722current = current.AsSpan(0, length - 4).Trim().ToString(); 3727current = current.AsSpan(0, length - 5).Trim().ToString();
System.Diagnostics.DiagnosticSource (16)
System\Diagnostics\Activity.cs (4)
1098new ActivityTraceId(traceIdSpan.ToString()), 1099new ActivitySpanId(spanIdSpan.ToString()), 1917return new ActivityTraceId(idData.ToString()); 2110return new ActivitySpanId(idData.ToString());
System\Diagnostics\DsesFilterAndTransform.cs (7)
260eventSource.Message("DiagnosticSource: Ignoring filterAndPayloadSpec '[AS]" + entry.ToString() + "' because sampling ratio was invalid"); 281eventSource.Message("DiagnosticSource: Ignoring filterAndPayloadSpec '[AS]" + entry.ToString() + "' because rate limiting sampling was invalid"); 292eventSource.Message("DiagnosticSource: Ignoring filterAndPayloadSpec '[AS]" + entry.ToString() + "' because sampling method was invalid"); 316eventSource.Message("DiagnosticSource: Ignoring filterAndPayloadSpec '[AS]" + entry.ToString() + "' because event name was invalid"); 331activityName = activitySourceName.Slice(plusSignIndex + 1).Trim().ToString(); 337eventSource.Message("DiagnosticSource: Ignoring filterAndPayloadSpec '[AS]" + entry.ToString() + "' because activity name cannot be specified for wildcard activity sources"); 384activitySourceName.ToString(),
System\Diagnostics\Metrics\MetricsEventSource.cs (2)
939string meterName = text.AsSpan(0, slashIdx).Trim().ToString(); 940string? instrumentName = text.AsSpan(slashIdx + 1).Trim().ToString();
System\Diagnostics\W3CPropagator.cs (3)
182return processed >= traceState.Length ? traceState : traceState.AsSpan(0, processed).ToString(); 238setter(carrier, Baggage, encodedBaggage.AsSpan(0, lastGoodLength - 2).ToString()); 256key = keySpan.ToString();
System.Drawing.Common (2)
System\Drawing\FontFamily.cs (2)
110throw new ArgumentException(SR.Format(SR.GdiplusFontFamilyNotFound, name.ToString())); 114throw new ArgumentException(SR.Format(SR.GdiplusNotTrueTypeFont, name.ToString()));
System.Drawing.Primitives (3)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (3)
97return Convert.ToInt32(text.Slice(1).ToString(), 16); 101return Convert.ToInt32(text.Slice(2).ToString(), 16); 112throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text.ToString(), nameof(Int32)), e);
System.Formats.Tar (1)
src\libraries\Common\src\System\IO\Archiving.Utils.Unix.cs (1)
25(false, false) => path.ToString(),
System.IO.Compression.ZipFile (1)
src\libraries\Common\src\System\IO\Archiving.Utils.Unix.cs (1)
25(false, false) => path.ToString(),
System.IO.FileSystem.Watcher (3)
System\IO\FileSystemWatcher.cs (3)
414OnRenamed(new RenamedEventArgs(action, _directory, name.IsEmpty ? null : name.ToString(), oldName.IsEmpty ? null : oldName.ToString())); 443InvokeOn(new FileSystemEventArgs(changeType, _directory, name.IsEmpty ? null : name.ToString()), handler);
System.IO.Packaging (4)
System\IO\Packaging\ContentType.cs (4)
293_type = ValidateToken(typeAndSubType.Slice(0, forwardSlashPos).ToString()); 294_subType = ValidateToken(typeAndSubType.Slice(forwardSlashPos + 1).ToString()); 336ValidateToken(parameterAndValue.Slice(0, equalSignIndex).ToString()), 337ValidateQuotedStringOrToken(parameterAndValue.Slice(parameterStartIndex, parameterValueLength).ToString()));
System.Net.HttpListener (5)
src\libraries\Common\src\System\Net\CookieParser.cs (1)
143_tokenStream.AsSpan(_start, _tokenLength).Trim().ToString();
System\Net\HttpListenerRequest.cs (2)
340attrValue = headerValue.AsSpan(i + 1, j - i - 1).Trim().ToString(); 353attrValue = headerValue.AsSpan(i, j - i).Trim().ToString();
System\Net\Managed\HttpListenerRequest.Managed.cs (2)
218string name = header.AsSpan(0, colon).Trim().ToString(); 219string val = header.AsSpan(colon + 1).Trim().ToString();
System.Net.Mail (2)
System\Net\Mail\MailAddressParser.cs (1)
425displayName = data.AsSpan(index + 1, startingIndex - index).Trim().ToString();
System\Net\Mime\SmtpDateTime.cs (1)
287timeZone = timeZoneSpan.ToString();
System.Net.Security (1)
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (1)
227host.ToString());
System.Net.WebHeaderCollection (2)
System\Net\HeaderInfoTable.cs (2)
41tempStringCollection.Add(singleValue.ToString()); 53tempStringCollection.Add(value.AsSpan(startIndex, length).Trim().ToString());
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
348SR.Format(SR.net_WebSockets_InvalidResponseHeader, ClientWebSocketDeflateConstants.Extension, value.ToString()));
System.Private.CoreLib (62)
src\libraries\Common\src\Interop\Interop.ICU.cs (2)
20InitICUFunctions(icuuc, icuin, version.ToString(), suffix.Length > 0 ? suffix.ToString() : null);
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (1)
60format = currentFormat.ToString();
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
54mountPoints.Add(mount.MountPoint.ToString());
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
84return buffer.Slice(0, length).ToString();
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (2)
84throw new FileLoadException(SR.InvalidAssemblyName, name.ToString()); 499tokenString = sb.AsSpan(0, length).ToString();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (1)
315public string Create(ReadOnlySpan<char> span) => span.ToString();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\NonRandomizedStringEqualityComparer.cs (2)
106span.ToString(); 138span.ToString();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\RandomizedStringEqualityComparer.cs (2)
58span.ToString(); 103span.ToString();
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (3)
697case ParseFailureKind.Format_BadDateOnly: throw new FormatException(SR.Format(SR.Format_BadDateOnly, s.ToString())); 700throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(DateOnly))); 822throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(DateOnly)));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (1)
759throw new ArgumentException(SR.Format(SR.EventSource_UnknownEtwTrait, etwTrait.ToString()), "traits");
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
1005result = (TUnderlying)ToObject(enumType, Convert.ChangeType(value.ToString(), underlyingType, CultureInfo.InvariantCulture)!); 1121throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString()));
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (1)
459callbackContext->Results.Add(calendarStringSpan.ToString());
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
1024string resultString = vlb.AsSpan().ToString();
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.Nls.cs (3)
208eraName.ToString(), abbreviatedEraName.ToString(), abbreviatedEnglishEraName.ToString());
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (2)
45string resultString = vlb.AsSpan().ToString(); 523_literals[field] = sb.AsSpan().ToString();
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
53Path.GetFileName(Path.TrimEndingDirectorySeparator(fullPath))).ToString();
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (2)
363throw Interop.GetExceptionForIoErrno(errorInfo, mkdirPath.ToString()); 392throw Interop.GetExceptionForIoErrno(errorInfo, mkdirPath.ToString());
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (5)
186return GetExtension(path.AsSpan()).ToString(); 230return result.ToString(); 260return result.ToString(); 449return path2.ToString(); 451return path1.ToString();
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (8)
319string result = vlb.AsSpan().ToString(); 498string result = FormatFloat(ref vlb, value, format, info) ?? vlb.AsSpan().ToString(); 691string result = vlb.AsSpan().ToString(); 805string result = vlb.AsSpan().ToString(); 921string result = vlb.AsSpan().ToString(); 1037string result = vlb.AsSpan().ToString(); 1155string result = vlb.AsSpan().ToString(); 1273string result = vlb.AsSpan().ToString();
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
1063errorMessage = SR.Format(SR.Format_InvalidStringWithValue, value.ToString());
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
141return (_object is string str) ? str.Substring(_index, _length) : Span.ToString();
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (2)
127_identifier = frameworkNameSpan[components[0]].Trim().ToString(); 183_profile = value.ToString();
src\libraries\System.Private.CoreLib\src\System\String.cs (2)
778return s.ToString(); 785result = s.ToString();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
1923splitStrings[arrIndex++] = thisEntry.ToString(); 1963splitStrings[arrIndex++] = thisEntry.ToString();
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (4)
290span.ToString(); 409span.ToString(); 471span.ToString(); 553span.ToString();
src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (1)
312itemFormat = format.Slice(startingPos, pos - startingPos).ToString();
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (3)
867case ParseFailureKind.Format_BadTimeOnly: throw new FormatException(SR.Format(SR.Format_BadTimeOnly, s.ToString())); 870throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(TimeOnly))); 992throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(TimeOnly)));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
858throw new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_UnparsablePosixMDateString, date.ToString()));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
399rootTypeName._namespace = rootFullName.Slice(0, idx).ToString();
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (3)
64Debug.Assert(parsedName.GetNodeCount() == recursiveDepth, $"Node count mismatch for '{typeName.ToString()}'"); 205throw new IO.FileLoadException(SR.InvalidAssemblyName, _inputString.ToString()); 214string fullName = fullTypeName.ToString();
System.Private.DataContractSerialization (5)
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (2)
178throw XmlExceptionHelper.CreateConversionException(ticksvalue.ToString(), "Int64", exception); 200throw XmlExceptionHelper.CreateConversionException(ticksvalue.ToString(), "DateTime", exception);
System\Runtime\Serialization\Json\XmlJsonReader.cs (2)
938throw XmlExceptionHelper.CreateConversionException(value.ToString(), "char", exception); 950throw XmlExceptionHelper.CreateConversionException(value.ToString(), "Int32", exception);
System\Xml\XmlBinaryWriter.cs (1)
603_attributeValue.WriteText(chars.ToString());
System.Private.Uri (4)
System\Uri.cs (1)
2753string s = result.ToString();
System\UriExt.cs (1)
601return backingString ?? charsToUnescape.ToString();
System\UriHelper.cs (2)
214return backingString ?? charsToEscape.ToString(); 619return backingString ?? strToClean.ToString();
System.Private.Xml (5)
System\Xml\Base64Decoder.cs (2)
147throw new XmlException(SR.Xml_InvalidBase64Value, chars.ToString()); 180throw new XmlException(SR.Xml_InvalidBase64Value, chars.ToString());
System\Xml\BinHexDecoder.cs (1)
165throw new XmlException(SR.Xml_InvalidBinHexValue, chars.ToString());
System\Xml\XPath\Internal\XPathScanner.cs (2)
343return span.Slice(0, i).ToString(); 348return span.ToString();
System.Reflection.Metadata (4)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
499tokenString = sb.AsSpan(0, length).ToString();
System\Reflection\Metadata\TypeName.cs (1)
399rootTypeName._namespace = rootFullName.Slice(0, idx).ToString();
System\Reflection\Metadata\TypeNameParser.cs (2)
64Debug.Assert(parsedName.GetNodeCount() == recursiveDepth, $"Node count mismatch for '{typeName.ToString()}'"); 214string fullName = fullTypeName.ToString();
System.Resources.Extensions (2)
System\Resources\Extensions\TypeNameComparer.cs (2)
109AssemblyName an1 = new AssemblyName(typeSpan1.ToString()); 110AssemblyName an2 = new AssemblyName(typeSpan2.ToString());
System.Runtime.Numerics (1)
System\Number.BigInteger.cs (1)
904strResult = MemoryMarshal.Cast<Utf16Char, char>(vlb.AsSpan()).ToString();
System.Security.Cryptography.ProtectedData (1)
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
84return buffer.Slice(0, length).ToString();
System.Text.Json (1)
System\Text\Json\ThrowHelper.Serialization.cs (1)
357return str.ToString();
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\RegexCompiler.cs (1)
6162Ldstr(chars.ToString());
System\Text\RegularExpressions\RegexNode.cs (1)
1312new RegexNode(RegexNodeKind.Multi, startingNodeOptions, startingSpan.ToString());
System\Text\RegularExpressions\RegexReplacement.cs (1)
62strings.Append(vsb.AsSpan().ToString());
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (1)
407: Literal(chars.ToString());
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (1)
1312new RegexNode(RegexNodeKind.Multi, startingNodeOptions, startingSpan.ToString());
System.Windows.Forms (8)
System\Resources\ResXResourceReader.cs (1)
453return typeName.AsSpan(0, index).Trim().ToString();
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1448string eventName = comSourceInterfaces.Value.AsSpan().SliceAtFirstNull().ToString();
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (2)
762nameString = helpString.ToString(); 767nameString = name.ToString();
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
97return typeInfoName.AsSpan().TrimStart('_').ToString();
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2204return new Font(cf.FaceName.ToString(), fontSize, style, GraphicsUnit.Point, cf.bCharSet);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (2)
465return [directory.ToString()]; 473? fileName.ToString()
System.Windows.Forms.Primitives (2)
System\ComponentModel\TypeConverterHelper.cs (1)
55output[i] = (T)converter.ConvertFromString(context, culture, text[tokens[i]].ToString())!;
System\Windows\Forms\Automation\UiaTextRange.cs (1)
881private static string GetFontName(LOGFONTW logfont) => logfont.FaceName.ToString();
System.Windows.Forms.Primitives.Tests (4)
Interop\Richedit\CHARFORMAT2WTests.cs (2)
22Assert.Equal("TwoFace", charFormat.FaceName.ToString()); 26Assert.Equal("Face", charFormat.FaceName.ToString());
Interop\User32\LOGFONTWTests.cs (2)
19Assert.Equal("TwoFace", logFont.FaceName.ToString()); 23Assert.Equal("Face", logFont.FaceName.ToString());
System.Windows.Forms.Primitives.TestUtilities (4)
Metafiles\RecordTypes\EMREXTCREATEFONTINDIRECTW.cs (1)
18=> $@"[{nameof(EMREXTCREATEFONTINDIRECTW)}] Index: {ihFont} FaceName: '{elfw.elfLogFont.FaceName.ToString()}' Height: {elfw.elfLogFont.lfHeight} Weight: FW_{elfw.elfLogFont.lfWeight}";
Metafiles\RecordTypes\EMREXTTEXTOUTW.cs (1)
21=> $@"[{nameof(EMREXTTEXTOUTW)}] Bounds: {rclBounds} Text: '{emrtext.GetText().ToString()}'";
Metafiles\Validators\FontFaceNameValidator.cs (1)
15public void Validate(DeviceContextState state) => Assert.Equal(_fontFaceName, state.SelectedFont.FaceName.ToString());
Metafiles\Validators\TextOutValidator.cs (1)
40Assert.Equal(_text, textOut->emrtext.GetText().ToString());
System.Windows.Forms.Tests (9)
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (3)
396Assert.False(string.IsNullOrEmpty(actual.FaceName.ToString())); 416Assert.True(string.IsNullOrEmpty(actual.FaceName.ToString())); 1086string actual = logFont.FaceName.ToString();
System\Windows\Forms\RichTextBoxTests.cs (3)
1611Assert.Equal(familyName, format.FaceName.ToString()); 1628Assert.Equal(Control.DefaultFont.Name, format1.FaceName.ToString()); 4939Assert.Equal("Arial", format.FaceName.ToString());
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (3)
369Assert.False(string.IsNullOrEmpty(actual.FaceName.ToString())); 383Assert.True(string.IsNullOrEmpty(actual.FaceName.ToString())); 928string actual = logFont.FaceName.ToString();
System.Xaml (2)
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
227string assemblyName = _fullyQualifyAssemblyName ? assembly.FullName : ReflectionUtils.GetAssemblyPartialName(assembly).ToString();
System\Xaml\XamlSchemaContext.cs (1)
1045string assemblyName = FullyQualifyAssemblyNamesInClrNamespaces ? assembly.FullName : ReflectionUtils.GetAssemblyPartialName(assembly).ToString();
Test.Utilities (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
Text.Analyzers (2)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
100public void AppendFormatted(ReadOnlySpan<char> value) => _builder!.Append(value.ToString());
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
315var text = chars.ToString();
xunit.assert (10)
StringAsserts.cs (10)
224 expectedSubstring.ToString(), 225 actualString.ToString() 471 throw DoesNotContainException.ForSubStringFound(expectedSubstring.ToString(), idx, actualString.ToString()); 830 throw EndsWithException.ForStringNotFound(expectedEndString.ToString(), actualString.ToString()); 965 throw EqualException.ForMismatchedStrings(expected.ToString(), actual.ToString(), expectedIndex, actualIndex); 1623 throw StartsWithException.ForStringNotFound(expectedStartString.ToString(), actualString.ToString());