public static DeliveryRule ToDeliveryRule(this PSDeliveryRule psDeliveryRule) { return(new DeliveryRule { Order = psDeliveryRule.Order, Actions = psDeliveryRule.Actions.Select(action => action.ToDeliveryRuleAction()).ToList(), Conditions = psDeliveryRule.Conditions.Select(condition => condition.ToDeliveryRuleCondition()).ToList() }); }
public override void ExecuteCmdlet() { var deliveryRule = new PSDeliveryRule { Name = Name, Order = Order, Conditions = Condition, Actions = Action }; WriteObject(deliveryRule); }