protected override async T.Task FireNodeObserverEventAsync(INodeObserverEvent snEvent, NodeObserver nodeObserver, CancellationToken cancel = default) { using (var op = SnTrace.Test.StartOperation( $"NodeObserverAction simulation: {nodeObserver.GetType().Name} {snEvent.GetType().Name}")) { await T.Task.Delay(20, cancel).ConfigureAwait(false); op.Successful = true; } await base.FireNodeObserverEventAsync(snEvent, nodeObserver, cancel); }
protected override async T.Task <bool> FireCancellableNodeObserverEventAsync(ISnCancellableEvent snEvent, NodeObserver nodeObserver, CancellationToken cancel = default) { using (var op = SnTrace.Test.StartOperation( $"NodeObserverAction simulation: {nodeObserver.GetType().Name} {snEvent.GetType().Name}")) { await T.Task.Delay(10, cancel).ConfigureAwait(false); op.Successful = true; } var result = snEvent.CancellableEventArgs.Cancel; result |= await base.FireCancellableNodeObserverEventAsync(snEvent, nodeObserver, cancel); return(result); }