C# Class Decision.Common.Experimental.ObjectPool.Pools.StringBuilderPool

Copied from Microsoft Roslyn code at http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.Workspaces/Formatting/StringBuilderPool.cs,039ef0c630df07c3 A pool of StringBuilder objects.
Show file Open project: rabbal/Decision

Public Methods

Method Description
Allocate ( ) : StringBuilder

Allocates an instance of StringBuilder from the object pool.

Free ( StringBuilder stringBuilder ) : void

Frees the specified string builder back to the object pool.

ReturnAndFree ( StringBuilder stringBuilder ) : string

Returns the string representation of the stringBuilder and frees it back to the object pool.

Method Details

Allocate() public static method

Allocates an instance of StringBuilder from the object pool.
public static Allocate ( ) : StringBuilder
return System.Text.StringBuilder

Free() public static method

Frees the specified string builder back to the object pool.
public static Free ( StringBuilder stringBuilder ) : void
stringBuilder System.Text.StringBuilder The string builder.
return void

ReturnAndFree() public static method

Returns the string representation of the stringBuilder and frees it back to the object pool.
public static ReturnAndFree ( StringBuilder stringBuilder ) : string
stringBuilder System.Text.StringBuilder The string builder.
return string