private void OnCancellableChanged(bool cancellable)
{
if (this.CancellationSupportChangedPrivate != null)
{
VsThreadingHelper.RunInline(this, VsTaskRunContext.UIThreadNormalPriority,
() =>
{
var delegates = this.CancellationSupportChangedPrivate;
if (delegates != null)
{
CancellationSupportChangedEventArgs args = new CancellationSupportChangedEventArgs(cancellable);
delegates(this, args);
// Verify that the observer handled it since now easy way of testing
// serialized raising and handling of the event across the classes
args.CheckHandled();
}
});
}
}