C# 클래스 WebMarkupMin.Core.Utilities.StringBuilderPool

Pool of string builders
파일 보기 프로젝트 열기: Taritsyn/WebMarkupMin 1 사용 예제들

공개 메소드들

메소드 설명
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