11using System . Diagnostics . CodeAnalysis ;
2+ using System . Runtime . CompilerServices ;
23
34namespace LinkDotNet . StringBuilder ;
45
@@ -14,6 +15,7 @@ public ref partial struct ValueStringBuilder
1415 /// The current version does not allow for a custom format.
1516 /// So: <code>AppendFormat("{0:00}")</code> is not allowed and will result in an exception.
1617 /// </remarks>
18+ [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
1719 public void AppendFormat < T > (
1820 [ StringSyntax ( StringSyntaxAttribute . CompositeFormat ) ] ReadOnlySpan < char > format ,
1921 T arg )
@@ -69,6 +71,7 @@ public void AppendFormat<T>(
6971 /// The current version does not allow for a custom format.
7072 /// So: <code>AppendFormat("{0:00}")</code> is not allowed and will result in an exception.
7173 /// </remarks>
74+ [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
7275 public void AppendFormat < T1 , T2 > (
7376 [ StringSyntax ( StringSyntaxAttribute . CompositeFormat ) ] ReadOnlySpan < char > format ,
7477 T1 arg1 ,
@@ -136,6 +139,7 @@ public void AppendFormat<T1, T2>(
136139 /// The current version does not allow for a custom format.
137140 /// So: <code>AppendFormat("{0:00}")</code> is not allowed and will result in an exception.
138141 /// </remarks>
142+ [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
139143 public void AppendFormat < T1 , T2 , T3 > (
140144 [ StringSyntax ( StringSyntaxAttribute . CompositeFormat ) ] ReadOnlySpan < char > format ,
141145 T1 arg1 ,
@@ -193,6 +197,7 @@ public void AppendFormat<T1, T2, T3>(
193197 }
194198 }
195199
200+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
196201 private static int GetValidArgumentIndex ( ReadOnlySpan < char > placeholder , int allowedRange )
197202 {
198203#pragma warning disable MA0011
0 commit comments