Exemplo n.º 1
0
        internal CollectorState GetState(string scriptResultText)
        {
            return(CollectorReturnValueCompareEngine.GetState(ReturnCheckSequence,
                                                              GoodResultMatchType, GoodScriptText,
                                                              WarningResultMatchType, WarningScriptText,
                                                              ErrorResultMatchType, ErrorScriptText,
                                                              scriptResultText));

            //CollectorState currentState = CollectorState.Good;

            //if (ReturnCheckSequence == ReturnCheckSequenceType.GWE)
            //{
            //    if (MatchGoodResult(scriptResultText))
            //        currentState = CollectorState.Good;
            //    else if (MatchWarningResult(scriptResultText))
            //        currentState = CollectorState.Warning;
            //    else
            //        currentState = CollectorState.Error;
            //}
            //else
            //{
            //    if (MatchErrorResult(scriptResultText))
            //        currentState = CollectorState.Error;
            //    else if (MatchWarningResult(scriptResultText))
            //        currentState = CollectorState.Warning;
            //    else
            //        currentState = CollectorState.Good;
            //}
            //return currentState;
        }
 public CollectorState GetState(object value)
 {
     return(CollectorReturnValueCompareEngine.GetState(ReturnCheckSequence,
                                                       GoodResultMatchType, GoodScriptText,
                                                       WarningResultMatchType, WarningScriptText,
                                                       ErrorResultMatchType, ErrorScriptText,
                                                       value));
 }