private void getValue() { if (Configuration.TrackComputingsExecutingUserCode) { Thread currentThread = Thread.CurrentThread; IComputing computing = DebugInfo._computingsExecutingUserCode.ContainsKey(currentThread) ? DebugInfo._computingsExecutingUserCode[currentThread] : null; DebugInfo._computingsExecutingUserCode[currentThread] = this; _userCodeIsCalledFrom = computing; _value = _getter(_propertyHolder); if (computing == null) { DebugInfo._computingsExecutingUserCode.TryRemove(currentThread, out IComputing _); } else { DebugInfo._computingsExecutingUserCode[currentThread] = computing; } _userCodeIsCalledFrom = null; } else { _value = _getter(_propertyHolder); } }
private TResult getResult() { TResult result; if (Configuration.TrackComputingsExecutingUserCode) { Thread currentThread = Thread.CurrentThread; IComputing computing = DebugInfo._computingsExecutingUserCode.ContainsKey(currentThread) ? DebugInfo._computingsExecutingUserCode[currentThread] : null; DebugInfo._computingsExecutingUserCode[currentThread] = this; _userCodeIsCalledFrom = computing; result = _getValueFunc(); if (computing == null) { DebugInfo._computingsExecutingUserCode.TryRemove(currentThread, out IComputing _); } else { DebugInfo._computingsExecutingUserCode[currentThread] = computing; } _userCodeIsCalledFrom = null; } else { result = _getValueFunc(); } return(result); }
private TReturnValue processNewValue(TValue newValue) { if (Configuration.TrackComputingsExecutingUserCode) { Thread currentThread = Thread.CurrentThread; IComputing computing = DebugInfo._computingsExecutingUserCode.ContainsKey(currentThread) ? DebugInfo._computingsExecutingUserCode[currentThread] : null; DebugInfo._computingsExecutingUserCode[currentThread] = this; _userCodeIsCalledFrom = computing; TReturnValue returnValue = _newValueProcessor(newValue, this, _returnValue); if (computing == null) { DebugInfo._computingsExecutingUserCode.TryRemove(currentThread, out IComputing _); } else { DebugInfo._computingsExecutingUserCode[currentThread] = computing; } _userCodeIsCalledFrom = null; return(returnValue); } else { return(_newValueProcessor(newValue, this, _returnValue)); } }
internal Invocation(Action <object> actionWithState, object state, OcDispatcher ocDispatcher, InvocationStatus invocationStatus, IComputing context = null, ManualResetEventSlim doneManualResetEvent = null) : this() { _actionWithState = actionWithState; _state = state; _ocDispatcher = ocDispatcher; _context = context; InvocationStatus = invocationStatus; _doneManualResetEvent = doneManualResetEvent; if (Configuration.SaveOcDispatcherInvocationStackTrace) { _callStackTrace = Environment.StackTrace; } }
internal Invocation(Action <object> actionWithState, object state, Dispatcher dispatcher, IComputing context = null) : this() { _actionWithState = actionWithState; _state = state; _dispatcher = dispatcher; _context = context; if (Configuration.SaveDispatcherInvocationStackTrace) { _callStackTrace = Environment.StackTrace; } }
public ObservableComputationsInconsistencyException(IComputing computing, string message, object eventSender, EventArgs eventArgs) : base(computing, message) { _eventSender = eventSender; _eventArgs = eventArgs; }
public ObservableComputationsException(IComputing computing, string message) : base(message) { _computing = computing; }