Пример #1
0
        internal bool IsValidChild(Activity activity, bool allowContextVariance)
        {
            if (this.currentActivity == null)
            {
                throw new ObjectDisposedException("ActivityExecutionContext");
            }

            if (activity == this.currentActivity.WorkflowCoreRuntime.CurrentActivity && this.allowSignalsOnCurrentActivity)
            {
                return(true);
            }

            if (activity.Enabled && activity.Parent == this.currentActivity.WorkflowCoreRuntime.CurrentActivity && (allowContextVariance || activity.Equals(this.Activity.GetActivityByName(activity.QualifiedName, true))))
            {
                return(true);
            }

            return(false);
        }