示例#1
0
        protected override void Execute(NativeActivityContext context)
        {
            BookmarkScope scope = this.Scope.Get(context);

            if (scope == null)
            {
                throw FxTrace.Exception.AsError(new InvalidOperationException(System.Activities.SR.CannotUnregisterNullBookmarkScope));
            }
            if (scope.Equals(context.DefaultBookmarkScope))
            {
                throw FxTrace.Exception.AsError(new InvalidOperationException(System.Activities.SR.CannotUnregisterDefaultBookmarkScope));
            }
            context.UnregisterBookmarkScope(scope);
        }
示例#2
0
        protected override void Execute(NativeActivityContext context)
        {
            BookmarkScope toUnregister = this.Scope.Get(context);

            if (toUnregister == null)
            {
                throw Microsoft.CoreWf.Internals.FxTrace.Exception.AsError(new InvalidOperationException(SR.CannotUnregisterNullBookmarkScope));
            }

            if (toUnregister.Equals(context.DefaultBookmarkScope))
            {
                throw Microsoft.CoreWf.Internals.FxTrace.Exception.AsError(new InvalidOperationException(SR.CannotUnregisterDefaultBookmarkScope));
            }

            context.UnregisterBookmarkScope(toUnregister);
        }
        protected override void Execute(NativeActivityContext context)
        {
            BookmarkScope toUnregister = this.Scope.Get(context);

            if (toUnregister == null)
            {
                throw SA.FxTrace.Exception.AsError(new InvalidOperationException(SA.SR.CannotUnregisterNullBookmarkScope));
            }

            if (toUnregister.Equals(context.DefaultBookmarkScope))
            {
                throw SA.FxTrace.Exception.AsError(new InvalidOperationException(SA.SR.CannotUnregisterDefaultBookmarkScope));
            }

            context.UnregisterBookmarkScope(toUnregister);
        }