refactor(opl): drop redundant Add(string) overload; OplTextBlock depends on IPropertyList
string converts implicitly to ReadOnlySpan<char>, so Add(ReadOnlySpan<char>) subsumes Add(string); $"..." literals still bind to the interpolated-string-handler overload (zero-alloc). OplTextBlock now holds an IPropertyList instead of the concrete ObjectPropertyList.
This commit is contained in:
parent
88de585612
commit
42ae2a1146
4 changed files with 7 additions and 9 deletions
|
|
@ -23,11 +23,11 @@ namespace Server;
|
|||
// Use with `using var block = list.TextBlock();`. ref struct: single-threaded OPL build only.
|
||||
public ref struct OplTextBlock
|
||||
{
|
||||
private readonly ObjectPropertyList _list;
|
||||
private readonly IPropertyList _list;
|
||||
internal ValueStringBuilder _builder;
|
||||
private bool _any;
|
||||
|
||||
internal OplTextBlock(ObjectPropertyList list)
|
||||
internal OplTextBlock(IPropertyList list)
|
||||
{
|
||||
_list = list;
|
||||
_builder = ValueStringBuilder.Create();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue