public override void ExecuteCmdlet() { var matchCondition = new PSMatchCondition { MatchVariable = MatchVariable, MatchValue = MatchValue.ToList(), NegateCondition = !this.IsParameterBound(c => c.NegateCondition)? false : NegateCondition, OperatorProperty = OperatorProperty, Selector = Selector }; WriteObject(matchCondition); }
public override void ExecuteCmdlet() { var matchCondition = new PSRulesEngineMatchCondition { RulesEngineMatchVariable = MatchVariable, RulesEngineMatchValue = MatchValue.ToList(), Selector = this.IsParameterBound(c => c.Selector) ? Selector : null, RulesEngineOperator = this.IsParameterBound(c => c.Operator) ? Operator : PSRulesEngineOperator.Any, NegateCondition = this.IsParameterBound(c => c.NegateCondition) ? NegateCondition : false, Transforms = this.IsParameterBound(c => c.Transform) ? Transform.ToList() : new List <PSTransform>() }; WriteObject(matchCondition); }
public override void ExecuteCmdlet() { ValidateArguments(); var matchCondition = new PSMatchCondition { MatchVariable = MatchVariable, MatchValue = MatchValue?.ToList(), NegateCondition = !this.IsParameterBound(c => c.NegateCondition) ? false : NegateCondition, OperatorProperty = OperatorProperty, Selector = Selector, Transform = Transform?.ToList() }; WriteObject(matchCondition); }