Ejemplo n.º 1
0
        internal List <MshExpressionResult> GetValues(PSObject target, bool expand, bool eatExceptions)
        {
            List <MshExpressionResult> retVal = new List <MshExpressionResult>();

            // process the script case
            if (Script != null)
            {
                MshExpression       scriptExpression = new MshExpression(Script);
                MshExpressionResult r = scriptExpression.GetValue(target, eatExceptions);
                retVal.Add(r);
                return(retVal);
            }

            // process the expression
            List <MshExpression> resolvedExpressionList = this.ResolveNames(target, expand);

            foreach (MshExpression re in resolvedExpressionList)
            {
                MshExpressionResult r = re.GetValue(target, eatExceptions);
                retVal.Add(r);
            }

            return(retVal);
        }
Ejemplo n.º 2
0
        internal List<MshExpressionResult> GetValues(PSObject target, bool expand, bool eatExceptions)
        {
            List<MshExpressionResult> retVal = new List<MshExpressionResult>();

            // process the script case
            if (Script != null)
            {
                MshExpression scriptExpression = new MshExpression(Script);
                MshExpressionResult r = scriptExpression.GetValue(target, eatExceptions);
                retVal.Add(r);
                return retVal;
            }

            // process the expression
            List<MshExpression> resolvedExpressionList = this.ResolveNames(target, expand);

            foreach (MshExpression re in resolvedExpressionList)
            {
                MshExpressionResult r = re.GetValue(target, eatExceptions);
                retVal.Add(r);
            }

            return retVal;
        }