private void ProcessStatusProgressImpl(OrderStatus status, string shipper) { if (status == OrderStatus.IN_STOCK) this.implementor = new InStockStatusProgressImpl(); else { if (shipper.Equals("BlackCat")) this.implementor = new BlackCatDeliveryProgressImpl(); else this.implementor = new PostOfficeDeliveryProgressImpl(); } }
private void ProcessStatusProgressImpl(OrderStatus status, string shipper) { if (status == OrderStatus.IN_STOCK) { this.implementor = new InStockStatusProgressImpl(); } else { if (shipper.Equals("BlackCat")) { this.implementor = new BlackCatDeliveryProgressImpl(); } else { this.implementor = new PostOfficeDeliveryProgressImpl(); } } }