本文整理汇总了C#中NativeActivityContext.CancelChildren方法的典型用法代码示例。如果您正苦于以下问题:C# NativeActivityContext.CancelChildren方法的具体用法?C# NativeActivityContext.CancelChildren怎么用?C# NativeActivityContext.CancelChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NativeActivityContext
的用法示例。
在下文中一共展示了NativeActivityContext.CancelChildren方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Cancel
protected override void Cancel(NativeActivityContext context)
{
if (!this.suppressCancel.Get(context))
{
context.CancelChildren();
}
}
示例2: Cancel
protected override void Cancel(NativeActivityContext context)
{
if (this.CompletionCondition == null)
{
base.Cancel(context);
}
else
{
context.CancelChildren();
}
}
示例3: Cancel
protected override void Cancel(NativeActivityContext context)
{
context.CancelChildren();
var bookmark = bookmarkProgress.Get(context);
var extension = context.GetExtension<Hosting.FileCopyExtension>();
extension.Cancel(bookmark.Name);
this.noPersistHandle.Get(context).Exit(context);
context.RemoveBookmark(bookmark);
context.MarkCanceled();
}
示例4: OnReceiveCompleted
/// <summary>
/// The on receive completed.
/// </summary>
/// <param name="context">
/// The context.
/// </param>
/// <param name="completedInstance">
/// The completed instance.
/// </param>
private void OnReceiveCompleted(
NativeActivityContext context, ActivityInstance completedInstance)
{
// Cancel the remaining children
context.CancelChildren();
}
示例5: OnConditionComplete
void OnConditionComplete(NativeActivityContext context, ActivityInstance completedInstance, bool result)
{
if (result)
{
context.CancelChildren();
this.hasCompleted.Set(context, true);
}
}
示例6: Cancel
protected override void Cancel(NativeActivityContext context)
{
context.CancelChildren();
}