상속: IScriptDecision
예제 #1
0
        public GeneralDecision CreateGeneralDecision(Func <bool> func, string displayText)
        {
            GeneralDecision generalDecision = new GeneralDecision();

            generalDecision.ConditionFunc = func;

#if DEBUG && (PC || WINDOWS)
            if (string.IsNullOrEmpty(displayText))
            {
                StackTrace   stackTrace  = new StackTrace();
                StackFrame[] stackFrames = stackTrace.GetFrames();


                generalDecision.Name = stackFrames[2].GetMethod().Name;
            }
            else
            {
                generalDecision.Name = displayText;
            }
#endif

            AddDecision(generalDecision);
            return(generalDecision);
        }
예제 #2
0
        public GeneralDecision CreateGeneralDecision(Func<bool> func, string displayText)
        {
            GeneralDecision generalDecision = new GeneralDecision();

            generalDecision.ConditionFunc = func;

#if DEBUG && (PC || WINDOWS)
            if (string.IsNullOrEmpty(displayText))
            {
                StackTrace stackTrace = new StackTrace();
                StackFrame[] stackFrames = stackTrace.GetFrames();


                generalDecision.Name = stackFrames[2].GetMethod().Name;
            }
            else
            {
                generalDecision.Name = displayText;
            }
#endif

            AddDecision(generalDecision);
            return generalDecision;
        }