Пример #1
0
        public void ResetIndent()
        {
            var scope = IndentScope.Get();

            scope.Enter(0, 0);
            scopes.Push(scope);
        }
Пример #2
0
 public void PopIndent(IndentScope scope)
 {
     if (scopes.Peek() == scope)
     {
         PopIndent();
     }
 }
Пример #3
0
        public void PushIndent(int delay = 0)
        {
            var scope = IndentScope.Get();

            scope.Enter(realIndentLevel + 1, delay);
            scopes.Push(scope);
        }
Пример #4
0
 public void PopIndent()
 {
     if (scopes.Count > 0)
     {
         IndentScope.Release(scopes.Pop());
     }
 }
Пример #5
0
 public static void Release(IndentScope scope)
 {
     pool.Push(scope);
 }