Example #1
0
        public void Invalidate()
        {
#if __WASM__ || __SKIA__
            InvalidateSource();
#endif
            Invalidated?.Invoke(this, EventArgs.Empty);
        }
        public void Invalidate()
        {
            var oldContainer = Container;

            Container = ConstructView();
            Invalidated.Invoke(this, oldContainer);
        }
 /// <summary>Flag the table as out of date</summary>
 public void Invalidate(object sender = null, EventArgs args = null)
 {
     if (!UpdateRequired)
     {
         Invalidated?.Invoke(this, EventArgs.Empty);
     }
     UpdateRequired = true;
 }
 private void NotifyUpdated()
 {
     _updated?.OnNext(Unit.Default);
     if (Invalidated != null)
     {
         Dispatcher.UIThread.Post(() => Invalidated?.Invoke(this, EventArgs.Empty));
     }
 }
 public bool Invalidate(IPipelineStage stage)
 {
     if (Invalidated.Add(stage))
     {
         InvalidatedByThisStep.Add(stage);
         return(true);
     }
     return(false);
 }
        /// <summary>
        /// Raises the <see cref="Invalidated"/> event.
        /// </summary>
        protected void Invalidate()
        {
            if (_host != null)
            {
                _host.Invalidate();
            }

            Invalidated?.Invoke(this, EventArgs.Empty);
        }
Example #7
0
 /// <summary>
 /// Adds a strategy to the chain at a particular stage.
 /// </summary>
 /// <param name="strategy">The strategy to add to the chain.</param>
 /// <param name="stage">The stage to add the strategy.</param>
 public void Add(TStrategyType strategy, TStageEnum stage)
 {
     lock (_lockObject)
     {
         _stages[Convert.ToInt32(stage)].Add(strategy);
         _cache = null;
         Invalidated?.Invoke(this, new EventArgs());
     }
 }
Example #8
0
        }   //nothrow

        //handlers:
        private void Source_Invalidated()
        {
            lock (m_lock)
            {
                m_mapper.Disconnect();
                m_mapper.Connect();

                Invalidated?.Invoke();
            }
        }
Example #9
0
        private void DataProvider_Invalidated()
        {
            using (Lock())
            {
                m_dataIndices.Clear();
                m_cache.Clear();
                LoadData();

                Invalidated?.Invoke();
            }
        }
Example #10
0
        public void InvalidateTime(Duration duration)
        {
            foreach (MusicTrack track in Tracks)
            {
                container.Settings.MusicBrain.Invalidate(track.Memory, duration);
            }

            Invalidated?.Invoke(duration);

            Refresh();
        }
Example #11
0
        public virtual void Invalidate(IRectangle item)
        {
            list.Add(item);
            Recent = item;

            if (Invalidated != null)
            {
                invalidate.Area = Recent;
                Invalidated.Invoke(this, invalidate);
            }
        }
Example #12
0
 public void Invalidate(string reason)
 {
     if (IsInvalidated)
     {
         return;
     }
     Logger.ApplicationInstance.Warn("Connection invalidated: " + reason);
     IsInvalidated      = true;
     InvalidationReason = reason;
     Invalidated?.Invoke(this, new EventArgs());
     OutboundMessageQueue.Invalidate(reason);
 }
Example #13
0
 /// <summary>
 /// Clear the current strategy chain list.
 /// </summary>
 /// <remarks>
 /// This will not clear the inner strategy chain if this instance was created with one.
 /// </remarks>
 public void Clear()
 {
     lock (_lockObject)
     {
         foreach (var list in _stages)
         {
             ((List <IBuilderStrategy>)list).Clear();
         }
         _cache = null;
         Invalidated?.Invoke(this, new EventArgs());
     }
 }
Example #14
0
        public ClockState Tick(TimeSpan time)
        {
            ClockState state = clock.Tick(time - beginTime);

            TimeSpan previousTick = state.PreviousTick == Granular.Compatibility.TimeSpan.MinValue ? Granular.Compatibility.TimeSpan.MinValue : beginTime + state.PreviousTick;
            TimeSpan nextTick     = state.NextTick == Granular.Compatibility.TimeSpan.MaxValue ? Granular.Compatibility.TimeSpan.MaxValue : beginTime + state.NextTick;

            this.CurrentState = new ClockState(state.ProgressState, state.Progress, state.Iteration, previousTick, nextTick);

            Invalidated.Raise(this);

            return(CurrentState);
        }
Example #15
0
            public void Clear()
            {
                Assert(IsConnected);

                lock (m_table)
                {
                    m_table.Clear();

                    if (AutoFlush)
                    {
                        m_table.Flush();
                    }

                    Invalidated?.Invoke();
                }

                Assert(Count == 0);
            }
Example #16
0
        protected void Invalidate(InvalidateMode mode)
        {
            if (_layoutSuspended)
            {
                return;
            }

            if (mode == InvalidateMode.Measure)
            {
                _arrangeIsDirty = true;
                _renderIsDirty  = true;
                if (!_measureIsDirty)
                {
                    _measureIsDirty = true;
                    Parent?.Invalidate(mode);
                    Invalidated?.Invoke(this, new InvalidatedEventArgs(mode));
                }
            }
            else if (mode == InvalidateMode.Arrange)
            {
                _renderIsDirty = true;
                if (!_arrangeIsDirty)
                {
                    _arrangeIsDirty = true;
                    Parent?.Invalidate(mode);
                    Invalidated?.Invoke(this, new InvalidatedEventArgs(mode));
                }
            }
            else if (mode == InvalidateMode.Render)
            {
                if (!_renderIsDirty)
                {
                    _renderIsDirty = true;
                    Parent?.Invalidate(mode);
                    Invalidated?.Invoke(this, new InvalidatedEventArgs(mode));
                }
            }
        }
Example #17
0
 /// <summary>
 /// Invalidates the current search snapshot due to content or size changes.
 /// The cache should be invalidated when either the content of the buffer or the buffer dimensions change
 /// because the snapshot has direct mappings to buffer line and locations.
 /// </summary>
 public void Invalidate()
 {
     // TODO: ideally this would be private and handled completely by the search service and consumers don't have to call this
     Invalidated?.Invoke(this, cache?.LastSearch);
     cache = null;
 }
Example #18
0
 private void CallInvalidated() => Invalidated?.Invoke(this, EventArgs.Empty);
Example #19
0
 public void OnPathInvalidate(Path newPath)
 {
     Invalidated?.Invoke(this, newPath);
 }
Example #20
0
 /// <summary>
 /// Raises the <see cref="Invalidated"/> event.
 /// </summary>
 protected void Invalidate() => Invalidated?.Invoke(this, EventArgs.Empty);
Example #21
0
 protected virtual void OnInvalidated()
 {
     Invalidated?.Invoke();
 }
Example #22
0
 protected internal virtual void OnInvalidated(EventArgs e)
 {
     Invalidated?.Invoke(this, e);
 }
Example #23
0
 private void NotifyInvalidated() => Invalidated?.Invoke();
 public bool Revalidate(IPipelineStage stage) => Invalidated.Remove(stage);
 public bool IsInvalidated(IPipelineStage stage) => Invalidated.Contains(stage);
Example #26
0
 public void NotifyInvalidated()
 {
     Invalidated?.Invoke(this, CacheEventArgs.Invalidated);
 }
Example #27
0
 /// <summary>
 /// Call this when it needs to updated
 /// </summary>
 protected virtual void OnInvalidate()
 {
     Invalidated?.Invoke(this, EventArgs.Empty);
 }
Example #28
0
 public void InvalidateDraw() => Invalidated?.Invoke(this, EventArgs.Empty);
Example #29
0
 private void OnInvalidated()
 {
     Invalidated?.Invoke(this, EventArgs.Empty);
 }
Example #30
0
 public void Invalidate()
 {
     Invalidated?.Invoke(this, EventArgs.Empty);
 }