Exemple #1
0
        static void Main(string[] args)
        {
            //Første version
            IRoutePlanner planner = new RoutePlanner();

            PrepareForPlanning(planner);

            //Anden version - brug af Proxy
            IRoutePlanner plannerProxy = new RoutePlannerProxy();

            PrepareForPlanning(plannerProxy);
        }
Exemple #2
0
 private void InitPlanner()
 {
     _planner = _planner ?? new RoutePlanner();
 }
Exemple #3
0
 public RoutePlannerProxy()
 {
     _planner = null;
 }