Skip to content

Commit

Permalink
Lucene.Net.Support.Threading.AtomicDouble: Added missing TryFormat ov…
Browse files Browse the repository at this point in the history
…erride
  • Loading branch information
NightOwl888 committed Dec 14, 2024
1 parent cc2650a commit 59b474f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Lucene.Net/Support/Threading/AtomicDouble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,26 @@ public override string ToString(string? format, IFormatProvider? provider)
return J2N.Numerics.Double.ToString(Value, format, provider);
}

#region TryFormat

/// <summary>
/// Tries to format the value of the current double instance into the provided span of characters.
/// </summary>
/// <param name="destination">The span in which to write this instance's value formatted as a span of characters.</param>
/// <param name="charsWritten">When this method returns, contains the number of characters that were written in
/// <paramref name="destination"/>.</param>
/// <param name="format">A span containing the characters that represent a standard or custom format string that
/// defines the acceptable format for <paramref name="destination"/>.</param>
/// <param name="provider">An optional object that supplies culture-specific formatting information for
/// <paramref name="destination"/>.</param>
/// <returns><c>true</c> if the formatting was successful; otherwise, <c>false</c>.</returns>
public override bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
{
return J2N.Numerics.Double.TryFormat(Value, destination, out charsWritten, format, provider);
}

#endregion

#region IConvertible Members

/// <inheritdoc/>
Expand Down

0 comments on commit 59b474f

Please sign in to comment.