Exemplo n.º 1
0
        /// <summary>
        /// Stores the single value of a <code>StackReferencer</code> to the collection at its <code>Token</code> key.
        /// </summary>
        public static void RegisterStack(StackReferencer referencer)
        {
            try
            {
                stackReferencers.Add(referencer.Token, referencer);
            }
            catch (Exception exception)
            {
                Debug.LogError(exception);
                Debug.Break();

                throw;
            }
            RegisterStack(referencer.Token, referencer.Values);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Removes all the content of a <code>StackReferencer</code> in the collection at the given <code>Token</code> key.
 /// </summary>
 /// <returns>Indicates if the removal was entirely successful</returns>
 public static bool RemoveFromStack(StackReferencer referencer)
 {
     return(referencers.Remove(referencer.Token) && RemoveFromStack(referencer.Token, referencer.Values).All(success => success));
 }