Table of Contents

Class StringBuilderPool

Namespace
AngleSharp.Text
Assembly
AngleSharp.dll

Provides a pool of used / recycled resources.

public static class StringBuilderPool
Inheritance
StringBuilderPool
Inherited Members

Properties

MaxCount

Gets or sets the maximum number of instances - at least 1.

public static int MaxCount { get; set; }

Property Value

int

SizeLimit

Gets or sets the max. capacity per instance - at least 85000.

public static int SizeLimit { get; set; }

Property Value

int

Methods

Obtain()

Either creates a fresh stringbuilder or gets a (cleaned) used one.

public static StringBuilder Obtain()

Returns

StringBuilder

A stringbuilder to use.

ToPool(StringBuilder)

Returns the given stringbuilder to the pool and gets the current string content.

public static string ToPool(this StringBuilder sb)

Parameters

sb StringBuilder

The stringbuilder to recycle.

Returns

string

The string that is created in the stringbuilder.