Class TabularStringFactory
Provides a creation method for creating string instances from character sequences.
public class TabularStringFactory : IDisposable
- Inheritance
-
TabularStringFactory
- Implements
Constructors
TabularStringFactory()
Initializes a new instance of the TabularStringFactory class.
public TabularStringFactory()
TabularStringFactory(int)
Initializes a new instance of the TabularStringFactory class with the specified maximum string length.
public TabularStringFactory(int maxLength)
Parameters
maxLength
intThe maximum length of a string to participate in pooling. Must be greater than zero and less than or equal to MaxLength.
Remarks
This constructor enables a thread-safe string pool based on hash code and length.
Methods
Create(ReadOnlySpan<char>)
Create a string instance from a character sequence.
public virtual string Create(ReadOnlySpan<char> source)
Parameters
source
ReadOnlySpan<char>The read-only character sequence to create from.
Returns
Dispose()
Releases the resources used by the current instance of the TabularStringFactory class.
public void Dispose()
Dispose(bool)
Releases the managed and unmanaged resources used by the current instance of the TabularStringFactory class.
protected virtual void Dispose(bool disposing)