コード例 #1
0
        private bool QualifiersMatch(RockContext rockContext, ConnectionWorkflow workflowTrigger, ConnectionState prevState, ConnectionState state)
        {
            var qualifierParts = (workflowTrigger.QualifierValue ?? "").Split(new char[] { '|' });

            bool matches = true;

            if (matches && qualifierParts.Length > 0 && !string.IsNullOrWhiteSpace(qualifierParts[0]))
            {
                matches = qualifierParts[0].AsInteger() == state.ConvertToInt();
            }

            if (matches && qualifierParts.Length > 2 && !string.IsNullOrWhiteSpace(qualifierParts[2]))
            {
                matches = qualifierParts[2].AsInteger() == prevState.ConvertToInt();
            }

            return(matches);
        }
コード例 #2
0
        private bool QualifiersMatch(BenevolenceWorkflow workflow, ConnectionState prevState, ConnectionState state)
        {
            if (prevState == state)
            {
                return(false);
            }

            var qualifierParts = (workflow.QualifierValue ?? "").Split(new char[] { '|' });

            bool matches = true;

            if (matches && qualifierParts.Length > 1 && !string.IsNullOrWhiteSpace(qualifierParts[1]))
            {
                matches = qualifierParts[1].AsInteger() == prevState.ConvertToInt();
            }

            if (matches && qualifierParts.Length > 2 && !string.IsNullOrWhiteSpace(qualifierParts[2]))
            {
                matches = qualifierParts[2].AsInteger() == state.ConvertToInt();
            }

            return(matches);
        }
コード例 #3
0
        private bool QualifiersMatch( RockContext rockContext, ConnectionWorkflow workflowTrigger, ConnectionState prevState, ConnectionState state )
        {
            var qualifierParts = ( workflowTrigger.QualifierValue ?? "" ).Split( new char[] { '|' } );

            bool matches = true;

            if ( matches && qualifierParts.Length > 0 && !string.IsNullOrWhiteSpace( qualifierParts[0] ) )
            {
                matches = qualifierParts[0].AsInteger() == state.ConvertToInt();
            }

            if ( matches && qualifierParts.Length > 2 && !string.IsNullOrWhiteSpace( qualifierParts[2] ) )
            {
                matches = qualifierParts[2].AsInteger() == prevState.ConvertToInt();
            }

            return matches;
        }