File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/BehavioralPatterns/Strategy/StrategyLibrary Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11using System ;
22using BuildingBlocks ;
33using StrategyLibrary . ShippingExample . ShippingProviders ;
4+ using StrategyLibrary . ShippingExample . ShippingProviders . Common ;
45
56namespace StrategyLibrary . ShippingExample
67{
@@ -39,7 +40,7 @@ public static void Execute()
3940 Description = "Xiaomi Mi 10T Pro" ,
4041 } ;
4142
42- var fedEx = new FedEx ( ) ;
43+ IShippingProvider fedEx = new FedEx ( ) ;
4344 var shippingCostCalculationService = new ShippingCostCalculationService ( fedEx ) ;
4445
4546 var price = shippingCostCalculationService . Calculate ( order ) ;
Original file line number Diff line number Diff line change 11using System ;
22using BuildingBlocks ;
33using StrategyLibrary . SortingExample . Strategies ;
4+ using StrategyLibrary . SortingExample . Strategies . Common ;
45
56namespace StrategyLibrary . SortingExample
67{
@@ -10,7 +11,7 @@ public static void Execute()
1011 {
1112 ConsoleExtension . WriteSeparator ( "Sorting example" ) ;
1213
13- var sortStrategy = new SortByFirstName ( ) ;
14+ ISortStrategy sortStrategy = new SortByFirstName ( ) ;
1415 var sortablePersons = new SortablePersons ( sortStrategy ) ;
1516
1617 sortablePersons . Add ( new Person ( "Dennis" , "Ritchie" , 1941 ) ) ;
You can’t perform that action at this time.
0 commit comments