public static dfList <dfMarkupToken> Tokenize(string source) { using (var tokenizer = (pool.Count > 0) ? pool.Pop() : new dfMarkupTokenizer()) { return(tokenizer.tokenize(source)); } }
public static dfMarkupTokenAttribute Obtain(dfMarkupToken key, dfMarkupToken value) { var instance = (pool.Count > 0) ? pool.Pop() : new dfMarkupTokenAttribute(); instance.Key = key; instance.Value = value; return(instance); }
public static LineRenderInfo Obtain(int start, int end) { var result = (pool.Count > 0) ? pool.Pop() : new LineRenderInfo(); result.startOffset = start; result.endOffset = end; result.lineHeight = 0; return(result); }
public static dfMarkupToken Obtain(string source, dfMarkupTokenType type, int startIndex, int endIndex) { var instance = (pool.Count > 0) ? pool.Pop() : new dfMarkupToken(); instance.inUse = true; instance.Source = source; instance.TokenType = type; instance.StartOffset = startIndex; instance.EndOffset = Mathf.Min(source.Length - 1, endIndex); return(instance); }
public static FontCharacterRequest Obtain() { return((pool.Count > 0) ? pool.Pop() : new FontCharacterRequest()); }