示例#1
0
        public virtual bool IsDependencyResolved( 
			ProcessState ps, 
			OperationState os, 
		    OperationState changedOpState, 
		    bool satisfyDependency )
        {
            throw new NotImplementedException();
        }
示例#2
0
        public override bool IsDependencyResolved(
			ProcessState ps, 
			OperationState os, 
			OperationState changedOpState,
			bool satisfyDependency)
        {
            bool resolved = false;
            bool anyAreFalse = false;
            foreach( OperationDependency opdep in Dependencies )
            {
                bool result = opdep.IsDependencyResolved(ps, os, changedOpState, satisfyDependency);
                if( result && joinOperator == JoinOperator.Or )
                {
                    resolved = true;
                    break;
                }
                else if( ! result && joinOperator == JoinOperator.And )
                {
                    anyAreFalse = true;
                    break;
                }
            }

            if( ( joinOperator == JoinOperator.And && ! anyAreFalse ) ||
                ( joinOperator == JoinOperator.Or && resolved ) )
            {
                return ! IsNonDependency;
            }

            return IsNonDependency;
        }
示例#3
0
 public override bool IsDependencyResolved(ProcessState ps, OperationState os, OperationState changedOpState, bool satisfyDependency)
 {
     return ( os.Task.CurrentState == taskState ) != IsNonDependency;
 }
示例#4
0
        public override bool IsDependencyResolved(
			ProcessState ps, 
			OperationState dependentState, 
			OperationState changedOpState, 
			bool satisfyDependency)
        {
            bool found = false;

            //loop through all other operationstates for the task and look to see if any are a match for operation & state
            if( changedOpState != null )
            {
                found = resolveDep( dependentState, changedOpState, satisfyDependency );
            }

            //otherwise loop through all the op states and see if the dep is satisfied.
            if( ! found )
            {

                //loop through all other operationstates for the process state and look to see if any are a match for operation & state
            foreach( OperationState potentialDependency in ps.Operations )
                {
                    found = resolveDep(dependentState, potentialDependency, satisfyDependency);
                    if( found )
                        break;
                }
            }
            //log.Debug( "returning ", found != IsNonDependency );
            return found != IsNonDependency;
        }