Exemple #1
0
        public void EndStaging(StagingCacheBase cache, bool consume, bool addSymbols)
        {
            if (IsCacheLocked(cache))
            {
                throw new InvalidOperationException("EndStaging called on invalid cache.");
            }

            caches.Pop();

            Print($"&b;Popped staging cache off the stack; stack now contains &d;{caches.Count}&b;.");

            if (consume)
            {
                Consume(cache.Consumed);
            }
            else
            {
                Print($"&3;Did not pass on consumed count; position is now &5;{Position}&3;.");
            }
            if (addSymbols)
            {
                AddSymbols(cache.Symbols);
            }
            else
            {
                Print($"&3;Did not pass on symbols.");
            }
        }
Exemple #2
0
 public bool IsCacheLocked(StagingCacheBase cache)
 {
     return(caches.Peek() != cache);
 }
Exemple #3
0
 public void EndStaging(StagingCacheBase cache, bool applyChanges) => EndStaging(cache, applyChanges, applyChanges);