private void NotifyResultChanged(object target, ValidationResult newResult, SynchronizationContext syncContext, bool useSyncContext = true) { if (useSyncContext && syncContext != null) { syncContext.Post(_ => NotifyResultChanged(target, newResult, syncContext, useSyncContext: false), null); return; } ResultChanged?.Invoke(this, new ValidationResultChangedEventArgs(target, newResult)); }
public void Handle(ResultChanged message) { DemoPrintouts.Begin("Relaying Result Changed Event ... "); var brokeredMessage = Interop.CreateMessage(message, Bus.CurrentMessageContext.Id); // Break free from the local transaction and unconditionally send this message. // If it fails (throws an exception, we'll try again) // If it succeeds AND throws an exception, ASB's Duplicate message detection will take discard the duplicate message using (var scope = new TransactionScope(TransactionScopeOption.Suppress)) { MessageSender.Send(brokeredMessage); scope.Complete(); DemoPrintouts.End("Done!"); } }
public ActionStatus Initialize(int channelsCount) { if (channelsCount <= 0) { return(ActionStatus.Error); } for (int i = 0; i < channelsCount; i++) { valves.Add(getValve()); //TODO - move out - direct wiring valves[i].OccuredErrorsChanged += (object sender, string errors, int channelNumber) => OccuredErrorsChanged?.Invoke(channelNumber, errors); valves[i].ActiveErrorsChanged += (object sender, string errors, int channelNumber) => ActiveErrorsChanged?.Invoke(channelNumber, errors); valves[i].ResultChanged += (object sender, Result result, int channelNumber) => ResultChanged?.Invoke(channelNumber, result); } return(ActionStatus.OK); }
/// <summary> /// This is a wrapper for the event <see cref="ResultChanged"/>. /// </summary> /// <param name="e">The event arguments.</param> protected virtual void OnResultChanged(EventArgs e) { ResultChanged?.Invoke(this, e); }
//Pass event of changed text of the TextBox to the outer world private void OnTextChanged(object sender, EventArgs e) { ResultChanged.Raise(this); }
private void OnResultChanged(ValidationResultChangedEventArgs e) { ResultChanged?.Invoke(this, e); }
protected virtual void OnResultChanged(ValidatorResultChangedEventArgs <T> e) { ResultChanged?.Invoke(this, e); }
void FireResultChanged(Runner r, int position) { ResultChanged?.Invoke(r, position); }
protected void OnResultChanged(BindingResult<TResult> newResult) { var oldResult = Result; Result = newResult; ResultChanged?.Invoke(this, BindingResultChange.Create(oldResult, newResult)); }
private void _onResultChanged(PingServerStateResult value) { ResultChanged?.Invoke(this, new PingServerResultEventArgs(value)); }