Beispiel #1
0
        private void ProcessExpressionParameter()
        {
            TerminatingErrorContext invocationContext = new TerminatingErrorContext(this);
            ParameterProcessor      processor         =
                new ParameterProcessor(new SelectObjectExpressionParameterDefinition());

            if ((Property != null) && (Property.Length != 0))
            {
                // Build property list taking into account the wildcards and @{name=;expression=}
                _propertyMshParameterList = processor.ProcessParameters(Property, invocationContext);
            }
            else
            {
                // Property don't exist
                _propertyMshParameterList = new List <MshParameter>();
            }

            if (!string.IsNullOrEmpty(ExpandProperty))
            {
                _expandMshParameterList = processor.ProcessParameters(new string[] { ExpandProperty }, invocationContext);
            }

            if (ExcludeProperty != null)
            {
                _exclusionFilter = new MshExpressionFilter(ExcludeProperty);
                // ExcludeProperty implies -Property * for better UX
                if ((Property == null) || (Property.Length == 0))
                {
                    Property = new Object[] { "*" };
                    _propertyMshParameterList = processor.ProcessParameters(Property, invocationContext);
                }
            }
        }
Beispiel #2
0
        private void ProcessExpressionParameter()
        {
            TerminatingErrorContext invocationContext = new TerminatingErrorContext(this);
            ParameterProcessor      processor         =
                new ParameterProcessor(new SelectObjectExpressionParameterDefinition());

            if ((Property != null) && (Property.Length != 0))
            {
                _propertyMshParameterList = processor.ProcessParameters(Property, invocationContext);
            }
            else
            {
                _propertyMshParameterList = new List <MshParameter>();
            }

            if (!string.IsNullOrEmpty(ExpandProperty))
            {
                _expandMshParameterList = processor.ProcessParameters(new string[] { ExpandProperty }, invocationContext);
            }

            if (ExcludeProperty != null)
            {
                _exclusionFilter = new MshExpressionFilter(ExcludeProperty);
            }
        }