C# Класс WebMarkupMin.Core.Utilities.StringBuilderPool

Pool of string builders
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetBuilder ( ) : StringBuilder

Gets a instance of string builder from the pool

GetBuilder ( int capacity ) : StringBuilder

Gets a instance of string builder with at least the given capacity from the pool

If the capacity is less than or equal to our maximum capacity, then return builder from the pool. Otherwise create a new string builder, that will just get discarded when released.

ReleaseBuilder ( StringBuilder builder ) : void

Returns a instance of string builder to the pool

Приватные методы

Метод Описание
GetBuilderSlow ( ) : StringBuilder
ReleaseBuilderSlow ( StringBuilder builder ) : void
StringBuilderPool ( ) : System

Static constructor

Описание методов

GetBuilder() публичный статический Метод

Gets a instance of string builder from the pool
public static GetBuilder ( ) : StringBuilder
Результат StringBuilder

GetBuilder() публичный статический Метод

Gets a instance of string builder with at least the given capacity from the pool
If the capacity is less than or equal to our maximum capacity, then return builder from the pool. Otherwise create a new string builder, that will just get discarded when released.
public static GetBuilder ( int capacity ) : StringBuilder
capacity int Capacity of string builder
Результат StringBuilder

ReleaseBuilder() публичный статический Метод

Returns a instance of string builder to the pool
public static ReleaseBuilder ( StringBuilder builder ) : void
builder StringBuilder Instance of string builder
Результат void