Beispiel #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);
        }
Beispiel #2
0
 private void InitPlanner()
 {
     _planner = _planner ?? new RoutePlanner();
 }
Beispiel #3
0
 public RoutePlannerProxy()
 {
     _planner = null;
 }