1 interface inheriting from ISpanFormattable
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (1)
25ISpanFormattable,
35 implementations of ISpanFormattable
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Redaction\TestSpanFormattable.cs (1)
10internal sealed class TestSpanFormattable : ISpanFormattable
Microsoft.Extensions.Telemetry.Tests (1)
Logging\JustInTimeRedactorTests.cs (1)
105private sealed class SpanFormattable : ISpanFormattable
System.Net.Primitives (3)
System\Net\IPAddress.cs (1)
20public class IPAddress : ISpanFormattable, ISpanParsable<IPAddress>, IUtf8SpanFormattable, IUtf8SpanParsable<IPAddress>
System\Net\IPEndPoint.cs (1)
17public class IPEndPoint : EndPoint, ISpanFormattable, ISpanParsable<IPEndPoint>, IUtf8SpanFormattable, IUtf8SpanParsable<IPEndPoint>
System\Net\IPNetwork.cs (1)
22public readonly struct IPNetwork : IEquatable<IPNetwork>, ISpanFormattable, ISpanParsable<IPNetwork>, IUtf8SpanFormattable, IUtf8SpanParsable<IPNetwork>
System.Private.CoreLib (28)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
19ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
27ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
20ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
51ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (1)
40ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
63: ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
26ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
22public abstract partial class Enum : ValueType, IComparable, ISpanFormattable, IConvertible
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
26: ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
25ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
31ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
17ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
24ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
24ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
24ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
24ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
33, ISpanFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
19ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
27ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
21ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
31ISpanFormattable,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
23public sealed class Version : ICloneable, IComparable, IComparable<Version?>, IEquatable<Version?>, ISpanFormattable, IUtf8SpanFormattable, IUtf8SpanParsable<Version>
System.Private.Uri (1)
System\Uri.cs (1)
20public partial class Uri : ISpanFormattable, IEquatable<Uri>, ISerializable
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
18: ISpanFormattable,
66 references to ISpanFormattable
Microsoft.AspNetCore.Components.Forms (4)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
264else if (typeof(ISpanFormattable).IsAssignableFrom(memberType)) 266var func = CreateMemberEvaluator<ISpanFormattable>(memberExpression); 316case ISpanFormattable spanFormattable:
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
91public void InsertFront<T>(T value) where T : ISpanFormattable
Microsoft.AspNetCore.Components.Web (4)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
264else if (typeof(ISpanFormattable).IsAssignableFrom(memberType)) 266var func = CreateMemberEvaluator<ISpanFormattable>(memberExpression); 316case ISpanFormattable spanFormattable:
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
91public void InsertFront<T>(T value) where T : ISpanFormattable
Microsoft.Build.Framework (2)
Utilities\StringBuilderHelper.cs (2)
43if (value is ISpanFormattable) 70if (value is ISpanFormattable)
Microsoft.Extensions.Compliance.Abstractions (6)
Redaction\Redactor.cs (6)
112if (value is ISpanFormattable) 118if (((ISpanFormattable)value).TryFormat(buffer, out int written, format.AsSpan(), provider)) 174if (value is ISpanFormattable) 179if (((ISpanFormattable)value).TryFormat(buffer, out int written, format.AsSpan(), provider)) 225if (value is ISpanFormattable) 230if (((ISpanFormattable)value).TryFormat(buffer, out int written, format, provider))
System.Console (1)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
390private unsafe void InternalWrite<T>(T message) where T : ISpanFormattable
System.Net.Http (1)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable
System.Net.Primitives (3)
System\Net\IPAddress.cs (1)
491bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System\Net\IPEndPoint.cs (1)
315bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System\Net\IPNetwork.cs (1)
350bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System.Private.CoreLib (35)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
197bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
1688bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
1259bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.GuidFormat)] ReadOnlySpan<char> format, IFormatProvider? provider) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IUtf8SpanFormattable.cs (1)
16/// An implementation of this interface should produce the same string of characters as an implementation of <see cref="IFormattable.ToString"/> or <see cref="ISpanFormattable.TryFormat"/>
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
6174if (value is ISpanFormattable) 6176if (((ISpanFormattable)value).TryFormat(_destination.Slice(_pos), out int charsWritten, default, _provider)) // constrained call avoiding boxing for value types 6235if (value is ISpanFormattable) 6237if (((ISpanFormattable)value).TryFormat(_destination.Slice(_pos), out int charsWritten, format, _provider)) // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
328/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
322/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
325/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (4)
279if (value is ISpanFormattable) 282while (!((ISpanFormattable)value).TryFormat(_chars.Slice(_pos), out charsWritten, default, _provider)) // constrained call avoiding boxing for value types 346if (value is ISpanFormattable) 349while (!((ISpanFormattable)value).TryFormat(_chars.Slice(_pos), out charsWritten, format, _provider)) // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
995else if (typeof(T).IsValueType && default(T) is ISpanFormattable)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
968bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (8)
1095private StringBuilder AppendSpanFormattable<T>(T value) where T : ISpanFormattable 1108internal StringBuilder AppendSpanFormattable<T>(T value, string? format, IFormatProvider? provider) where T : ISpanFormattable 1466private unsafe StringBuilder InsertSpanFormattable<T>(int index, T value) where T : ISpanFormattable 1770arg is ISpanFormattable spanFormattableArg && 3033else if (value is ISpanFormattable) 3036if (((ISpanFormattable)value).TryFormat(destination, out int charsWritten, default, _provider)) // constrained call avoiding boxing for value types 3104else if (value is ISpanFormattable) 3107if (((ISpanFormattable)value).TryFormat(destination, out int charsWritten, format, _provider)) // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (7)
464if (value is ISpanFormattable) 522if (value is ISpanFormattable) 684Debug.Assert(value is ISpanFormattable); 687return ((ISpanFormattable)value).TryFormat(utf16, out int charsWritten, format, _provider) ? 694Debug.Assert(value is ISpanFormattable); 710if (((ISpanFormattable)value).TryFormat(array, out charsWritten, format, thisRef._provider)) 741Debug.Assert(value is ISpanFormattable);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ValueStringBuilder.AppendFormat.cs (1)
215arg is ISpanFormattable spanFormattableArg &&
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
270bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System.Private.Uri (1)
System\Uri.cs (1)
1652bool ISpanFormattable.TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider) =>
System.Private.Windows.Core (2)
System\Text\ValueStringBuilder.cs (2)
240public void AppendFormatted<TFormattable>(TFormattable value) where TFormattable : ISpanFormattable 245while (!((ISpanFormattable)value).TryFormat(_chars[_pos..], out charsWritten, format: default, provider: default))
System.Private.Xml (1)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable
System.Reflection.Metadata (1)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
342[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ISpanFormattable))]
System.Runtime.Numerics (2)
System\Numerics\Complex.cs (1)
865/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
System\Numerics\Complex.Generic.cs (1)
2071/// <inheritdoc cref="ISpanFormattable.TryFormat(Span{char}, out int, ReadOnlySpan{char}, IFormatProvider?)" />
System.Web.HttpUtility (1)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
8internal void AppendSpanFormattable<T>(T value, string? format = null, IFormatProvider? provider = null) where T : ISpanFormattable