Exemplo n.º 1
0
 protected virtual void OnInconsistencyDetected(ServerModeInconsistencyDetectedEventArgs e)
 {
     if (InconsistencyDetected != null)
     {
         InconsistencyDetected(this, e);
     }
 }
Exemplo n.º 2
0
        void _List_InconsistencyDetected(object sender, ServerModeInconsistencyDetectedEventArgs e)
        {
            OnInconsistencyDetected(e);
            if (e.Handled)
            {
                return;
            }
            SynchronizationContext context = SynchronizationContext.Current;

            if (IsGoodContext(context))
            {
                PostState state = new PostState();
                state.ShouldFailWithException = true;
                context.Post(DoPostponedReload, state);
                state.ShouldFailWithException = false;
            }
            else
            {
                FailUnderAspOrAnotherNonPostEnvironment();
            }
        }