예제 #1
0
 public static Car getLuxuryMercedes()
 {
     if (!storedObjects.ContainsKey("luxurymercedes"))
     {
         storedObjects["luxurymercedes"] = new LuxuryCarDecorator(new Mercedes());
     }
     return(storedObjects["luxurymercedes"]);
 }
예제 #2
0
 public static Car getLuxuryNiva()
 {
     if (!storedObjects.ContainsKey("luxuryniva"))
     {
         storedObjects["luxuryniva"] = new LuxuryCarDecorator(new Niva());
     }
     return(storedObjects["luxuryniva"]);
 }