Esempio n. 1
0
        public void ResetIndent()
        {
            var scope = IndentScope.Get();

            scope.Enter(0, 0);
            scopes.Push(scope);
        }
Esempio n. 2
0
 public void PopIndent(IndentScope scope)
 {
     if (scopes.Peek() == scope)
     {
         PopIndent();
     }
 }
Esempio n. 3
0
        public void PushIndent(int delay = 0)
        {
            var scope = IndentScope.Get();

            scope.Enter(realIndentLevel + 1, delay);
            scopes.Push(scope);
        }
Esempio n. 4
0
 public void PopIndent()
 {
     if (scopes.Count > 0)
     {
         IndentScope.Release(scopes.Pop());
     }
 }
Esempio n. 5
0
 public static void Release(IndentScope scope)
 {
     pool.Push(scope);
 }