Table of Contents

Class TabularStringFactory

Namespace
Addax.Formats.Tabular
Assembly
Addax.Formats.Tabular.dll

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 int

The 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

string

A new or an existing string instance.

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)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.