public static void CancelSelfAndChildren(TreeNodeData node) { foreach (var c in node.DescendantsAndSelf()) { var id = c as IAsyncCancellable; if (id != null) id.Cancel(); } }
public static void CancelSelfAndChildren(TreeNodeData node) { foreach (var c in node.DescendantsAndSelf()) { if (c is IAsyncCancellable id) { id.Cancel(); } } }
public static void CancelSelfAndChildren(TreeNodeData node) { foreach (var c in node.DescendantsAndSelf()) { var id = c as IAsyncCancellable; if (id != null) { id.Cancel(); } } }