Пример #1
0
        /// <summary>
        /// Add a reference to a newly instantiated hub tile.
        /// </summary>
        /// <param name="tile">The newly instantiated hub tile.</param>
        internal static void InitializeReference(HubTile tile)
        {
            WeakReference wref = new WeakReference(tile, TrackResurrection);
            if (tile.IsFrozen)
            {
                AddReferenceToFrozenPool(wref);
            }
            else
            {
                AddReferenceToEnabledPool(wref);
            }

            RestartTimer();
        }
Пример #2
0
        /// <summary>
        /// Unfreezes a hub tile and restarts the timer if needed.
        /// </summary>
        /// <param name="tile">The hub tile to be unfrozen.</param>
        public static void UnfreezeHubTile(HubTile tile)
        {
            WeakReference wref = new WeakReference(tile, TrackResurrection);
            AddReferenceToEnabledPool(wref);
            RemoveReferenceFromFrozenPool(wref);
            RemoveReferenceFromStalledPipeline(wref);

            RestartTimer();
        }
Пример #3
0
 /// <summary>
 /// Remove all references of a hub tile before finalizing it.
 /// </summary>
 /// <param name="tile">The hub tile that is to be finalized.</param>
 internal static void FinalizeReference(HubTile tile)
 {
     WeakReference wref = new WeakReference(tile, TrackResurrection);
     HubTileService.RemoveReferenceFromEnabledPool(wref);
     HubTileService.RemoveReferenceFromFrozenPool(wref);
     HubTileService.RemoveReferenceFromStalledPipeline(wref);
 }